Package ghidra.app.util
Class XReferenceUtil
- java.lang.Object
-
- ghidra.app.util.XReferenceUtil
-
@Deprecated public class XReferenceUtil extends java.lang.Object
Deprecated.deprecated for 10.1; removal for 10.3 or laterA utility class to handle the generation of direct and offcut cross-reference (xref) lists on code units and stack variables.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALL_REFS
Deprecated.
-
Constructor Summary
Constructors Constructor Description XReferenceUtil()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Set<Reference>
getAllXrefs(ProgramLocation location)
Deprecated.Returns all xrefs to the given location.static int
getOffcutXRefCount(CodeUnit cu)
Deprecated.Returns the count of all offcut xref addresses to the specified code unitstatic Reference[]
getOffcutXReferences(CodeUnit cu, int maxXRefs)
Deprecated.Returns an array containing all offcut xref references to the specified code unitstatic Address[]
getOffcutXRefList(CodeUnit cu)
Deprecated.Returns an array containing all offcut xref addresses to the specified code unit.static Address[]
getOffcutXRefList(CodeUnit cu, int maxXRefs)
Deprecated.Returns an array containing all offcut xref addresses to the specified code unit.static java.util.Set<Reference>
getVariableRefs(Variable var)
Deprecated.Returns the direct and offcut xrefs to the specified variablestatic void
getVariableRefs(Variable var, java.util.List<Reference> xrefs, java.util.List<Reference> offcuts)
Deprecated.Populates the provided lists with the direct and offcut xrefs to the specified variablestatic Reference[]
getXReferences(CodeUnit cu, int maxNumber)
Deprecated.Returns an array containing the firstmaxNumber
direct xref references to the specified code unit.static Address[]
getXRefList(CodeUnit cu)
Deprecated.Returns an array containing all direct xref addresses to the specified code unit.static Address[]
getXRefList(CodeUnit cu, int maxNumber)
Deprecated.Returns an array containing the firstmaxNumber
direct xref addresses to the specified code unit.static void
showAllXrefs(Navigatable navigatable, ServiceProvider serviceProvider, TableService service, ProgramLocation location, java.util.Set<Reference> xrefs)
Deprecated.Shows all xrefs to the given location in a new table.
-
-
-
Field Detail
-
ALL_REFS
public static final int ALL_REFS
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getXRefList
public static final Address[] getXRefList(CodeUnit cu)
Deprecated.Returns an array containing all direct xref addresses to the specified code unit.- Parameters:
cu
- the code unit to generate the xrefs- Returns:
- array of all xrefs to the code unit
-
getXRefList
public static final Address[] getXRefList(CodeUnit cu, int maxNumber)
Deprecated.Returns an array containing the firstmaxNumber
direct xref addresses to the specified code unit.- Parameters:
cu
- the code unit to generate the xrefsmaxNumber
- max number of xrefs to get, or -1 to get all references- Returns:
- array first
maxNumber
xrefs to the code unit
-
getXReferences
public static final Reference[] getXReferences(CodeUnit cu, int maxNumber)
Deprecated.Returns an array containing the firstmaxNumber
direct xref references to the specified code unit.- Parameters:
cu
- the code unit to generate the xrefsmaxNumber
- max number of xrefs to get, or -1 to get all references- Returns:
- array first
maxNumber
xrefs to the code unit
-
getOffcutXRefList
public static final Address[] getOffcutXRefList(CodeUnit cu)
Deprecated.Returns an array containing all offcut xref addresses to the specified code unit.- Parameters:
cu
- the code unit to generate the offcut xrefs- Returns:
- array of all offcut xrefs to the code unit
-
getOffcutXRefList
public static final Address[] getOffcutXRefList(CodeUnit cu, int maxXRefs)
Deprecated.Returns an array containing all offcut xref addresses to the specified code unit.- Parameters:
cu
- the code unit to generate the offcut xrefsmaxXRefs
- max number of offcut xrefs to get, or -1 to get all offcut references- Returns:
- array of all offcut xrefs to the code unit
-
getOffcutXReferences
public static final Reference[] getOffcutXReferences(CodeUnit cu, int maxXRefs)
Deprecated.Returns an array containing all offcut xref references to the specified code unit- Parameters:
cu
- the code unit to generate the offcut xrefsmaxXRefs
- max number of offcut xrefs to get, or -1 to get all offcut references- Returns:
- array of all offcut xrefs to the code unit
-
getOffcutXRefCount
public static int getOffcutXRefCount(CodeUnit cu)
Deprecated.Returns the count of all offcut xref addresses to the specified code unit- Parameters:
cu
- the code unit to generate the offcut xrefs- Returns:
- count of all offcut xrefs to the code unit
-
getVariableRefs
public static void getVariableRefs(Variable var, java.util.List<Reference> xrefs, java.util.List<Reference> offcuts)
Deprecated.Populates the provided lists with the direct and offcut xrefs to the specified variable- Parameters:
var
- variable to get referencesxrefs
- list to put direct references inoffcuts
- list to put offcut references in
-
getVariableRefs
public static java.util.Set<Reference> getVariableRefs(Variable var)
Deprecated.Returns the direct and offcut xrefs to the specified variable- Parameters:
var
- variable to get references- Returns:
- the set of references
-
showAllXrefs
public static void showAllXrefs(Navigatable navigatable, ServiceProvider serviceProvider, TableService service, ProgramLocation location, java.util.Set<Reference> xrefs)
Deprecated.Shows all xrefs to the given location in a new table. These xrefs are retrieved from the given supplier. Thus, it is up to the client to determine which xrefs to show.- Parameters:
navigatable
- the navigatable used for navigation from the tableserviceProvider
- the service provider needed to wire navigationservice
- the service needed to show the tablelocation
- the location for which to find referencesxrefs
- the xrefs to show
-
getAllXrefs
public static java.util.Set<Reference> getAllXrefs(ProgramLocation location)
Deprecated.Returns all xrefs to the given location. If in data, then xrefs to the specific data component will be returned. Otherwise, the code unit containing the address of the given location will be used as the source of the xrefs.- Parameters:
location
- the location for which to get xrefs- Returns:
- the xrefs
-
-