mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -40,6 +40,13 @@ public class FunctionDefinitionLocationDescriptor extends GenericDataTypeLocatio
|
|||||||
protected void doGetReferences(Accumulator<LocationReference> accumulator, TaskMonitor monitor)
|
protected void doGetReferences(Accumulator<LocationReference> accumulator, TaskMonitor monitor)
|
||||||
throws CancelledException {
|
throws CancelledException {
|
||||||
|
|
||||||
|
findAppliedFunctionDefinition(accumulator);
|
||||||
|
|
||||||
|
ReferenceUtils.findDataTypeReferences(accumulator, functionDefinition, program, true,
|
||||||
|
monitor);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findAppliedFunctionDefinition(Accumulator<LocationReference> accumulator) {
|
||||||
DataType myReturnType = functionDefinition.getReturnType();
|
DataType myReturnType = functionDefinition.getReturnType();
|
||||||
ParameterDefinition[] myParameters = functionDefinition.getArguments();
|
ParameterDefinition[] myParameters = functionDefinition.getArguments();
|
||||||
|
|
||||||
@@ -49,15 +56,14 @@ public class FunctionDefinitionLocationDescriptor extends GenericDataTypeLocatio
|
|||||||
|
|
||||||
// the definition could be applied in more than one namespace, so handle each application
|
// the definition could be applied in more than one namespace, so handle each application
|
||||||
while (symbols.hasNext()) {
|
while (symbols.hasNext()) {
|
||||||
Symbol symbol = symbols.next();
|
|
||||||
|
|
||||||
if (!(symbol instanceof FunctionSymbol)) {
|
Symbol symbol = symbols.next();
|
||||||
|
if (!(symbol instanceof FunctionSymbol functionSymbol)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
FunctionSymbol functionSymbol = (FunctionSymbol) symbol;
|
|
||||||
long symbolID = functionSymbol.getID();
|
long symbolID = functionSymbol.getID();
|
||||||
Function function = functionManager.getFunction(symbolID);
|
Function function = functionManager.getFunction(symbolID);
|
||||||
|
|
||||||
FunctionSignature signature = function.getSignature(true);
|
FunctionSignature signature = function.getSignature(true);
|
||||||
ParameterDefinition[] theirParameters = signature.getArguments();
|
ParameterDefinition[] theirParameters = signature.getArguments();
|
||||||
if (!isSameParamters(myParameters, theirParameters)) {
|
if (!isSameParamters(myParameters, theirParameters)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user