From 124347ffe18f40f366886ce8fb5016a3466e5b30 Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:59:07 -0400 Subject: [PATCH] Test fixes --- .../address/ExactMatchAddressCorrelator.java | 9 +++++++-- .../vt/gui/plugin/AddressCorrelatorManager.java | 16 ---------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/address/ExactMatchAddressCorrelator.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/address/ExactMatchAddressCorrelator.java index 80b1b2e332..044a8f47fe 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/address/ExactMatchAddressCorrelator.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/correlator/address/ExactMatchAddressCorrelator.java @@ -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; + } } diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/plugin/AddressCorrelatorManager.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/plugin/AddressCorrelatorManager.java index 7f2d0b611c..dc218ed3f4 100644 --- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/plugin/AddressCorrelatorManager.java +++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/plugin/AddressCorrelatorManager.java @@ -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 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; } }