Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-7-31-24'

This commit is contained in:
Ryan Kurtz 2024-07-31 11:06:05 -04:00
commit 21d433b26c
2 changed files with 7 additions and 18 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.
@ -80,4 +80,9 @@ public class ExactMatchAddressCorrelator implements AddressCorrelator {
public Options getDefaultOptions() {
return new ToolOptions(CORRELATOR_NAME);
}
@Override
public int getPriority() {
return EARLY_PRIORITY;
}
}

View File

@ -27,7 +27,6 @@ import ghidra.framework.options.*;
import ghidra.program.model.listing.Data;
import ghidra.program.model.listing.Function;
import ghidra.program.util.*;
import ghidra.util.Msg;
import ghidra.util.classfinder.ClassSearcher;
public class AddressCorrelatorManager {
@ -83,16 +82,6 @@ public class AddressCorrelatorManager {
correlatorList.addAll(initializeAddressCorrelators());
correlatorList.sort(CORRELATOR_COMPARATOR);
StringBuilder buffy = new StringBuilder();
for (AddressCorrelator ac : correlatorList) {
buffy.append(ac.getClass().getSimpleName())
.append("; priority: ")
.append(ac.getPriority())
.append('\n');
}
Msg.trace(this, "Finished assembling correlators. Sorted list:\n" + buffy);
}
private List<AddressCorrelator> initializeAddressCorrelators() {
@ -111,14 +100,9 @@ public class AddressCorrelatorManager {
}
private AddressCorrelation getFunctionCorrelator(Function source, Function destination) {
Msg.trace(this, "Source / Destination functions: " + source + "; " + destination);
for (AddressCorrelator correlator : correlatorList) {
Msg.trace(this, "\tchecking correlator: " + correlator.getClass().getSimpleName());
AddressCorrelation correlation = correlator.correlate(source, destination);
if (correlation != null) {
Msg.trace(this, "\t\tusing correlator: " + correlator);
return correlation;
}
}