GP-6008 Changed SourceType examination to base upon priorty instead of specific value equality when appropriate

This commit is contained in:
ghidra1 2025-09-24 09:16:04 -04:00
parent edea7dfd65
commit a3bd708160
20 changed files with 131 additions and 144 deletions

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -273,9 +273,8 @@ public class ApplyFidEntriesCommand extends BackgroundCommand<Program> {
SymbolTable symbolTable = program.getSymbolTable();
SymbolIterator symbols = symbolTable.getSymbolsAsIterator(function.getEntryPoint());
for (Symbol symbol : symbols) {
SourceType sourceType = symbol.getSource();
if (sourceType == SourceType.USER_DEFINED || sourceType == SourceType.IMPORTED) {
return true;
if (symbol.getSource().isHigherOrEqualPriorityThan(SourceType.IMPORTED)) {
return true; // symbol has trusted source
}
}
return false;