Ghidra is a software reverse engineering (SRE) framework
GP-5151 - Fixed Diff exception by making the diff task modal
dragonmacher12295af96171
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiff.java b/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiff.javaindex 5e09d2dace..2170016a51 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiff.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiff.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.@@ -19,10 +19,8 @@ import java.util.*;import javax.help.UnsupportedOperationException;-import ghidra.program.database.data.ProgramBasedDataTypeManagerDB;import ghidra.program.database.properties.UnsupportedMapDB;import ghidra.program.model.address.*;-import ghidra.program.model.data.ProgramBasedDataTypeManager;import ghidra.program.model.lang.Register;import ghidra.program.model.lang.RegisterValue;import ghidra.program.model.listing.*;@@ -484,10 +482,8 @@ public class ProgramDiff {synchronized public AddressSetView getDifferences(ProgramDiffFilter filter, TaskMonitor monitor)throws CancelledException {cancelled = false;- if (monitor == null) {- // Create a do nothing task monitor that we can pass along.- monitor = TaskMonitor.DUMMY;- }++ monitor = TaskMonitor.dummyIfNull(monitor);if (!filterChanged && ((filter != null) && (filter.equals(this.pdf)))) {return diffsToReturn;@@ -500,6 +496,7 @@ public class ProgramDiff {// Create any required address sets.int[] pt = ProgramDiffFilter.getPrimaryTypes();for (int element : pt) {+// Are we interested in this difference type?if (pdf.getFilter(element)) {Integer key = element;diff --git a/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMergeManager.java b/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMergeManager.javaindex 680189dd0b..909cee56b0 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMergeManager.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMergeManager.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.@@ -21,7 +21,6 @@ import ghidra.program.model.mem.MemoryAccessException;import ghidra.util.Msg;import ghidra.util.exception.CancelledException;import ghidra.util.task.TaskMonitor;-import ghidra.util.task.TaskMonitorAdapter;/*** <CODE>ProgramMergeManager</CODE> is a class for merging the differences between two@@ -60,16 +59,13 @@ public class ProgramMergeManager {** @param program1 the first program (read only) for the merge.* @param program2 the second program (read only) for the merge.- * @param monitor the task monitor for indicating progress at determining- * the differences. This also allows the user to cancel the merge.- ** @throws ProgramConflictException if the memory blocks, that overlap* between the two programs, do not match. This indicates that programs* couldn't be compared to determine the differences.*/- public ProgramMergeManager(Program program1, Program program2, TaskMonitor monitor)+ public ProgramMergeManager(Program program1, Program program2)throws ProgramConflictException {- this(program1, program2, null, monitor);+ this(program1, program2, null);}/**@@ -83,15 +79,12 @@ public class ProgramMergeManager {* can only be merged if they overlap this address set. null means find* differences in each of the entire programs.* The addresses in this set should be derived from program1.- * @param monitor the task monitor for indicating progress at determining- * the differences. This also allows the user to cancel the merge.- ** @throws ProgramConflictException if the memory blocks, that overlap* between the two programs, do not match. This indicates that programs* couldn't be compared to determine the differences.*/public ProgramMergeManager(Program program1, Program program2,- AddressSetView p1LimitedAddressSet, TaskMonitor monitor)+ AddressSetView p1LimitedAddressSet)throws ProgramConflictException {this.program1 = program1;this.program2 = program2;@@ -126,10 +119,10 @@ public class ProgramMergeManager {* @return the program differences.* The addresses in this address set are derived from program2.*/- public AddressSetView getFilteredDifferences() {+ AddressSetView getFilteredDifferences() {AddressSetView p2DiffSet = null;try {- p2DiffSet = programDiff.getDifferences(diffFilter, null);+ p2DiffSet = programDiff.getDifferences(diffFilter, TaskMonitor.DUMMY);}catch (CancelledException e) {// Shouldn't ever throw cancelled since this method uses a dummy monitor.@@ -433,9 +426,9 @@ public class ProgramMergeManager {// Check that the needed memory addresses are available in the merge program.if (!hasMergeAddresses(p1MergeSet)) {- errorMsg.append("The Difference cannot be applied.\n"- + "The program does not have memory defined\n"- + "for some of the indicated addresses.\n");+ errorMsg.append("The Difference cannot be applied.\n" ++ "The program does not have memory defined\n" ++ "for some of the indicated addresses.\n");return false;}diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeOverlayTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeOverlayTest.javaindex 002d886317..2f99feb17d 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeOverlayTest.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeOverlayTest.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.@@ -121,7 +121,7 @@ public class ProgramDiffMergeOverlayTest extends AbstractProgramDiffTest {as.addRange(addr(p1, "SomeOverlay::01001780"), addr(p1, "SomeOverlay::01001780"));as.addRange(addr(p1, "OtherOverlay::01001680"), addr(p1, "OtherOverlay::01001680"));- ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.FUNCTION_TAG_DIFFS));programMerge.setMergeFilter(@@ -183,7 +183,7 @@ public class ProgramDiffMergeOverlayTest extends AbstractProgramDiffTest {programDiff.setFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));assertEquals(as, programDiff.getDifferences(programDiff.getFilter(), null));- ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));@@ -246,7 +246,7 @@ public class ProgramDiffMergeOverlayTest extends AbstractProgramDiffTest {programDiff.setFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));assertEquals(as, programDiff.getDifferences(programDiff.getFilter(), null));- ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ ProgramMergeManager programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS | ProgramMergeFilter.PRIMARY_SYMBOL,diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeTest.javaindex dbf8dcc0a9..f7eb80bf20 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeTest.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramDiffMergeTest.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.@@ -15,11 +15,13 @@*/package ghidra.program.util;-import static org.junit.Assert.*;import static ghidra.program.util.ProgramDiffFilter.*;+import static org.junit.Assert.*;import java.util.Arrays;+import org.junit.*;+import ghidra.program.model.address.*;import ghidra.program.model.data.Pointer16DataType;import ghidra.program.model.listing.*;@@ -30,8 +32,6 @@ import ghidra.test.ToyProgramBuilder;import ghidra.util.exception.CancelledException;import ghidra.util.task.TaskMonitor;-import org.junit.*;-public class ProgramDiffMergeTest extends AbstractGhidraHeadlessIntegrationTest {private ToyProgramBuilder programBuilder1;@@ -388,7 +388,8 @@ public class ProgramDiffMergeTest extends AbstractGhidraHeadlessIntegrationTest}@Test- public void testMergeDestFallthroughOverrideWithNonDefaultRefs_CodeUnitsOnly() throws Exception {+ public void testMergeDestFallthroughOverrideWithNonDefaultRefs_CodeUnitsOnly()+ throws Exception {Address p1CallFromAddr = addr1(0x01001018);ReferenceManager refMgr1 = program1.getReferenceManager();@@ -588,11 +589,11 @@ public class ProgramDiffMergeTest extends AbstractGhidraHeadlessIntegrationTestprivate ProgramMergeManager mergeCodeUnitsOnly(AddressSet mergeSet)throws ProgramConflictException, MemoryAccessException, CancelledException {- ProgramMergeFilter programMergeFilter =+ ProgramMergeFilter programMergeFilter =new ProgramMergeFilter(ProgramMergeFilter.CODE_UNITS, ProgramMergeFilter.REPLACE);return mergeUsingFilter(mergeSet, programMergeFilter);}-+private ProgramMergeManager mergeCodeUnitsAndRefs(AddressSet mergeSet)throws ProgramConflictException, MemoryAccessException, CancelledException {ProgramMergeFilter programMergeFilter =@@ -600,7 +601,7 @@ public class ProgramDiffMergeTest extends AbstractGhidraHeadlessIntegrationTestProgramMergeFilter.REPLACE);return mergeUsingFilter(mergeSet, programMergeFilter);}-+private ProgramMergeManager mergeRefsOnly(AddressSet mergeSet) throws ProgramConflictException,MemoryAccessException, CancelledException {ProgramMergeFilter programMergeFilter =@@ -608,10 +609,11 @@ public class ProgramDiffMergeTest extends AbstractGhidraHeadlessIntegrationTestreturn mergeUsingFilter(mergeSet, programMergeFilter);}- private ProgramMergeManager mergeUsingFilter(AddressSet mergeSet, ProgramMergeFilter programMergeFilter)+ private ProgramMergeManager mergeUsingFilter(AddressSet mergeSet,+ ProgramMergeFilter programMergeFilter)throws ProgramConflictException, MemoryAccessException, CancelledException {ProgramMergeManager programMerge =- new ProgramMergeManager(program1, program2, null, TaskMonitor.DUMMY); // null means entire program+ new ProgramMergeManager(program1, program2);int txId = program1.startTransaction("Merge into Program 1");boolean commit = false;try {diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge1Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge1Test.javaindex 3738b9712d..48b14c5a0a 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge1Test.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge1Test.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.@@ -91,7 +91,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {@Testpublic void testCompareSameAddressSpaces() throws Exception {try {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);}catch (ProgramConflictException e) {Assert.fail("Address spaces in program 1 and program 2 should have been the same.");@@ -109,7 +109,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {ProgramBuilder programBuilder3 = new ProgramBuilder("program3", ProgramBuilder._8051);p3 = programBuilder3.getProgram();- programMerge = new ProgramMergeManager(p1, p3, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p3);assertNull(programMerge);}catch (ProgramConflictException e) {@@ -124,7 +124,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {@Testpublic void testCompareSameMemory() throws Exception {try {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertTrue("Memory in program 1 and program 2 should have been the same.",programMerge.memoryMatches());}@@ -146,7 +146,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemory("d4", "0x400", 0x100);try {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertTrue("Memory in program 1 and program 2 should have been different.",!programMerge.memoryMatches());}@@ -160,7 +160,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {*/@Testpublic void testDiffFilter() throws Exception {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);// Check that default filter has all difference types set.assertEquals(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS),programMerge.getDiffFilter());@@ -183,7 +183,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {*/@Testpublic void testMergeFilter() throws Exception {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);// Check that default filter has all difference types set.assertEquals(new ProgramMergeFilter(), programMerge.getMergeFilter());@@ -213,7 +213,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {*/@Testpublic void testGetPrograms() throws Exception {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(p1, programMerge.getProgramOne());assertEquals(p2, programMerge.getProgramTwo());}@@ -231,7 +231,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemory("d1", "0x100", 0x100, null, (byte) 0xAF);programBuilder2.createMemory("d4", "0x400", 0x100);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSetView as = programMerge.getAddressesOnlyInOne();AddressSet as1 = new AddressSet();as1.add(new AddressRangeImpl(addr(0x200), addr(0x2ff)));@@ -251,7 +251,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemory("d1", "0x100", 0x100, null, (byte) 0xAF);programBuilder2.createMemory("d4", "0x400", 0x100);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSetView as = programMerge.getAddressesOnlyInTwo();AddressSet as2 = new AddressSet();as2.add(new AddressRangeImpl(addr(0x400), addr(0x4ff)));@@ -271,7 +271,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemory("d1", "0x100", 0x100, null, (byte) 0xAF);programBuilder2.createMemory("d4", "0x400", 0x100);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as1 = new AddressSet();as1.add(new AddressRangeImpl(addr(0x100), addr(0x1ff)));as1.add(new AddressRangeImpl(addr(0x200), addr(0x2ff)));@@ -298,7 +298,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemory("d1", "0x100", 0x100, null, (byte) 0xAF);programBuilder2.createMemory("d4", "0x400", 0x100);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as1 = new AddressSet();as1.add(new AddressRangeImpl(addr(0x100), addr(0x1ff)));as1.add(new AddressRangeImpl(addr(p1, 0x01001000), addr(p1, 0x010075ff)));@@ -325,7 +325,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createLabel("0x01006420", "Function2");programBuilder2.createComment("0x010059a3", "There you have it.", CodeUnit.EOL_COMMENT);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));AddressSetView diffs;@@ -336,7 +336,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {// Program Diff only determines differences within the limited set.programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01002239), addr(0x0100248c)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01002239), addr(0x0100248c)));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));AddressSet as = new AddressSet();as.addRange(addr(0x01002239), addr(0x0100248c));@@ -362,7 +362,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createLabel("0x01006420", "Function2");programBuilder2.createComment("0x010059a3", "There you have it.", CodeUnit.EOL_COMMENT);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));AddressSetView diffs;@@ -403,7 +403,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createLabel("0x01006420", "Function2");programBuilder2.createComment("0x010059a3", "There you have it.", CodeUnit.EOL_COMMENT);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));AddressSetView diffs;@@ -518,7 +518,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.createComment("0x100415a", "Plate Comment", CodeUnit.PLATE_COMMENT);programBuilder2.createComment("0x100415a", "Plate Comment", CodeUnit.PLATE_COMMENT);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));@@ -552,7 +552,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {// 0x100248f: p1 has function comment.programBuilder1.createFunctionComment("0x100248f", "Sample function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));@@ -569,7 +569,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {// 0x100248f: p2 has function comment.programBuilder2.createFunctionComment("0x100248f", "Other function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));@@ -587,7 +587,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.createFunctionComment("0x100248f", "Sample function comment.");programBuilder2.createFunctionComment("0x100248f", "Sample function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));@@ -605,7 +605,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.createFunctionComment("0x100248f", "Sample function comment.");programBuilder2.createFunctionComment("0x100248f", "Other function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));@@ -713,7 +713,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.createComment("0x100415a", "Plate Comment", CodeUnit.PLATE_COMMENT);programBuilder2.createComment("0x100415a", "Plate Comment", CodeUnit.PLATE_COMMENT);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));@@ -764,7 +764,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {// 0x100248f: p1 has function comment.programBuilder1.createFunctionComment("0x100248f", "Sample function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));@@ -782,7 +782,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {// 0x100248f: p2 has function comment.programBuilder2.createFunctionComment("0x100248f", "Other function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));@@ -800,7 +800,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.createFunctionComment("0x100248f", "Sample function comment.");programBuilder2.createFunctionComment("0x100248f", "Sample function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));@@ -818,7 +818,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.createFunctionComment("0x100248f", "Sample function comment.");programBuilder2.createFunctionComment("0x100248f", "Other function comment.");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));@@ -843,7 +843,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createExternalReference("0x0100102c", "ADVAPI32.dll", "IsTextUnicode", 0);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01001000), addr(0x010017ff)));AddressSet as = new AddressSet(addr(0x0100102c), addr(0x0100102f));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -865,7 +865,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createExternalReference("0x01001034", "myGDI32.dll", "SomePlace", 0);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01001000), addr(0x010017ff)));AddressSet as = new AddressSet(addr(0x01001034), addr(0x01001037));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -887,7 +887,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createExternalReference("0x01001038", "GDI32.dll", "ABC12345", 0);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01001000), addr(0x010017ff)));AddressSet as = new AddressSet(addr(0x01001038), addr(0x0100103b));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -909,7 +909,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createExternalReference("0x0100103c", "GDI32.dll", "XYZ", "0x77f4abcd", 0);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01001000), addr(0x010017ff)));AddressSet as = new AddressSet(addr(0x0100103c), addr(0x0100103f));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -930,7 +930,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createExternalReference("0x01001044", "GDI32.dll", "MNM", 0);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01001000), addr(0x010017ff)));AddressSet as = new AddressSet(addr(0x01001044), addr(0x01001047));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -968,7 +968,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createStackReference("0x1006480", RefType.READ, -0x6c,SourceType.USER_DEFINED, 0);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet();as.addRange(addr(0x1006443), addr(0x1006445));as.addRange(addr(0x1006446), addr(0x100644c));@@ -1032,7 +1032,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {as.addRange(addr(0x01002cf5), addr(0x01002d0c));as.addRange(addr(0x01002950), addr(0x0100295c));as.addRange(addr(0x010033f6), addr(0x010033fe));- programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, as);AddressSet expectedDiffs = new AddressSet();expectedDiffs.addRange(addr(0x010018a6), addr(0x010018a6));expectedDiffs.addRange(addr(0x0100295a), addr(0x0100295a));@@ -1080,7 +1080,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.setStringProperty("0x10039f1", "testColor", "BLACK");programBuilder2.setStringProperty("0x10039f8", "testColor", "BLACK");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet();as.addRange(addr(0x10018ae), addr(0x10018ae));as.addRange(addr(0x10018ce), addr(0x10018ce));@@ -1147,7 +1147,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createLabel("1002d25", "junk", p2.getGlobalNamespace().getName());p2.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet expectedDiffs = new AddressSet();expectedDiffs.addRange(addr(0x1002d16), addr(0x1002d16));expectedDiffs.addRange(addr(0x1002d18), addr(0x1002d18));@@ -1187,7 +1187,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createLabel("1002d1d", "Foo", namespaceStr);p2.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x1002d1d), addr(0x1002d1d));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -1209,7 +1209,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function1.insertParameter(0, var1, SourceType.USER_DEFINED);p1.endTransaction(transactionID1, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1243,7 +1243,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.insertParameter(0, var2, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1266,7 +1266,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.insertParameter(0, var2, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1308,7 +1308,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.addParameter(var2C, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1351,7 +1351,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.addParameter(var2C, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1394,7 +1394,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.addParameter(var2C, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1436,7 +1436,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {assertEquals(3, function2.getParameterCount());p2.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1459,7 +1459,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function1.addParameter(var1, SourceType.USER_DEFINED);p1.endTransaction(transactionID1, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1482,7 +1482,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.addParameter(var2, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1516,7 +1516,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.insertParameter(0, var2, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1532,7 +1532,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {// no params in program 1 or 2- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1556,7 +1556,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function2.insertParameter(0, var2, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1580,7 +1580,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {function1.insertParameter(0, var1, SourceType.USER_DEFINED);p1.endTransaction(transactionID1, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1653,7 +1653,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {programBuilder1.setRegisterValue(DR0_REGISTER, "0x1005e7b", "0x1005e83", 0x85678);AddressSet as;- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);as = new AddressSet();as.addRange(addr(0x010022d4), addr(0x010022e5));@@ -1700,7 +1700,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {symtab2.createLabel(addr(0x1002969), "ONE", SourceType.USER_DEFINED);AddressSet limitedAddrSet = new AddressSet(addr(0x1002950), addr(0x100299b));programMerge =- new ProgramMergeManager(p1, p2, limitedAddrSet, TaskMonitor.DUMMY);+ new ProgramMergeManager(p1, p2, limitedAddrSet);AddressSet as = new AddressSet(addr(0x100295d));AddressSet as2 = new AddressSet(addr(0x1002969));diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge2Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge2Test.javaindex 07f42c3a8a..1ce97f5713 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge2Test.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge2Test.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.@@ -138,7 +138,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -207,7 +207,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -276,7 +276,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -348,7 +348,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(@@ -413,7 +413,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -475,7 +475,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -547,7 +547,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -613,7 +613,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x1002998"), addr(p1, "0x1002a0c"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -686,7 +686,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x1002998"), addr(p1, "0x1002a0c"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -763,7 +763,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.SYMBOL_DIFFS));@@ -844,7 +844,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.SYMBOL_DIFFS));@@ -933,7 +933,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.SYMBOL_DIFFS));@@ -1021,7 +1021,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));ProgramMergeFilter filter = new ProgramMergeFilter();@@ -1102,7 +1102,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));ProgramMergeFilter filter = new ProgramMergeFilter();@@ -1190,7 +1190,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));ProgramMergeFilter filter = new ProgramMergeFilter();@@ -1278,7 +1278,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1354,7 +1354,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1427,7 +1427,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1501,7 +1501,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1578,7 +1578,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1654,7 +1654,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1730,7 +1730,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -1825,7 +1825,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {int txId = p1.startTransaction("Merge into Program 1");boolean commit = false;try {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -1944,7 +1944,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {int txId = p1.startTransaction("Merge into Program 1");boolean commit = false;try {- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -2040,7 +2040,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2112,7 +2112,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2188,7 +2188,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2260,7 +2260,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2335,7 +2335,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2407,7 +2407,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2480,7 +2480,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_TAG_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2553,7 +2553,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_TAG_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2636,7 +2636,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2758,7 +2758,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2880,7 +2880,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -2979,7 +2979,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "TextOverlay::01001630"),addr(p1, "TextOverlay::0100182f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -3062,7 +3062,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "TextOverlay::01001630"),addr(p1, "TextOverlay::0100182f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -3145,7 +3145,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "TextOverlay::01001630"),addr(p1, "TextOverlay::0100182f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -3237,7 +3237,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {int txId = p1.startTransaction("Merge into Program 1");boolean commit = false;try {- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));@@ -3330,7 +3330,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {int txId = p1.startTransaction("Merge into Program 1");boolean commit = false;try {- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -3454,7 +3454,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {int txId = p1.startTransaction("Merge into Program 1");boolean commit = false;try {- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));@@ -3585,7 +3585,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {int txId = p1.startTransaction("Merge into Program 1");boolean commit = false;try {- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));programMerge.setMergeFilter(@@ -3675,7 +3675,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -3760,7 +3760,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -3852,7 +3852,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -3920,7 +3920,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x8080"), addr(p1, "0x80d0"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);//programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));programMerge.setMergeFilter(@@ -4035,7 +4035,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x1000"), addr(p1, "0x1000"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -4120,7 +4120,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x1000"), addr(p1, "0x1000"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -4219,7 +4219,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x1002249"), addr(p1, "0x1002249"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -4316,7 +4316,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {try {AddressSet setToDiff = new AddressSet();setToDiff.addRange(addr(p1, "0x1002249"), addr(p1, "0x1002249"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -4406,7 +4406,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {addr(p2, "SomeOverlay::0100192f"));setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),addr(p1, "OtherOverlay::0100192f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));AddressSet expectedDiffs = new AddressSet();@@ -4515,7 +4515,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {addr(p2, "SomeOverlay::0100192f"));setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),addr(p1, "OtherOverlay::0100192f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));AddressSet expectedDiffs = new AddressSet();@@ -4621,7 +4621,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {addr(p2, "SomeOverlay::0100192f"));setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),addr(p1, "OtherOverlay::0100192f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));AddressSet expectedDiffs = new AddressSet();@@ -4725,7 +4725,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {addr(p2, "SomeOverlay::0100192f"));setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),addr(p1, "OtherOverlay::0100192f"));- programMerge = new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, setToDiff);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));AddressSet expectedDiffs = new AddressSet();diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge3Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge3Test.javaindex 270796c0b6..6e3c239311 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge3Test.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramMerge3Test.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.@@ -101,7 +101,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {AddressSet addrSet = new AddressSet(addr(0x1002488), addr(0x1002492));addrSet.addRange(addr(0x01002428), addr(0x0100242c));- programMerge = new ProgramMergeManager(p1, p2, addrSet, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, addrSet);AddressSet as = new AddressSet(addr(0x100248c), addr(0x100248e));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.USER_DEFINED_DIFFS));programMerge.setMergeFilter(@@ -149,7 +149,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createBookmark("0x1002323", BookmarkType.INFO, "stuff", "My bookmark");programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x1002306), addr(0x100232f)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x1002306), addr(0x100232f)));AddressSet as = new AddressSet(addr(0x100230b), addr(0x100231c));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BOOKMARK_DIFFS));programMerge.setMergeFilter(@@ -176,7 +176,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.setBytes("0x01002cf8", "3b 74 24 0c", true);// p1 & p2 differ at byte at 0x01002cfb.- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BYTE_DIFFS | ProgramDiffFilter.CODE_UNIT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(@@ -213,7 +213,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.setBytes("0x1002b45", "8b");programBuilder2.setBytes("0x1002b49", "57");- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BYTE_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.BYTES, ProgramMergeFilter.REPLACE));@@ -268,7 +268,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {AddressSet as = new AddressSet();as.addRange(addr(0x1001000), addr(0x1003abf));as.addRange(addr(0x1003bed), addr(0x10075ff));- programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, as);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.CODE_UNIT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.CODE_UNITS, ProgramMergeFilter.REPLACE));@@ -311,7 +311,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {union_a2.add(struct_b1);programBuilder2.applyDataType("0x01003b02", union_a2, 1);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.CODE_UNIT_DIFFS));programMerge.setMergeFilter(new ProgramMergeFilter(ProgramMergeFilter.CODE_UNITS, ProgramMergeFilter.REPLACE));@@ -394,7 +394,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {struct_a2.add(new DWordDataType());programBuilder2.applyDataType("0x01003ac8", struct_a2, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003ac8), addr(0x01003acc)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003ac8, 0x01003acc);@@ -412,7 +412,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x01003b29", new PointerDataType(new ByteDataType()), 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b29), addr(0x01003b2c)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b29, 0x01003b2c);@@ -432,7 +432,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x01003b31", new ArrayDataType(new ByteDataType(), 5, 1), 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b31), addr(0x01003b35)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b31, 0x01003b35);@@ -446,7 +446,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x1003b3a", new DoubleDataType(), 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b3a), addr(0x01003b41)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b3a, 0x01003b41);@@ -470,7 +470,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x01003b45", outer, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(), programMerge.getFilteredDifferences());}@@ -488,7 +488,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {struct_a2.add(new DWordDataType());programBuilder2.applyDataType("0x01003b5e", struct_a2, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b5e), addr(0x01003b62)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b5e, 0x01003b62);@@ -524,7 +524,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {// NOTE: unknown settings will be dropped during merge- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet addrSet = new AddressSet();addrSet.addRange(addr(p1, 0x1008014), addr(p1, 0x1008015));@@ -552,7 +552,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {struct_b2.add(new PointerDataType(new CharDataType()));programBuilder2.applyDataType("0x01003ad5", struct_b2, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003ad5), addr(0x01003ad9)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003ad5, 0x01003ad9);@@ -577,7 +577,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {union_c2.add(new DWordDataType());programBuilder2.applyDataType("0x01003ae1", union_c2, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003ae1), addr(0x01003ae6)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003ae1, 0x01003ae6);@@ -596,7 +596,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x1003aed", struct_a1, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003aec), addr(0x01003af1)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003aec, 0x01003af1);@@ -619,7 +619,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {struct_altName_a1.add(new DWordDataType());programBuilder2.applyDataType("0x1003af7", struct_altName_a1, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003af7), addr(0x01003afb)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003af7, 0x01003afb);@@ -641,7 +641,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {struct_sub1_a1.add(new DWordDataType());programBuilder2.applyDataType("0x1003b02", struct_sub1_a1, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b02), addr(0x01003b06)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b02, 0x01003b06);@@ -657,7 +657,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x1003b0d", new ByteDataType(), 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b0d), addr(0x01003b0e)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b0d, 0x01003b0e);@@ -673,7 +673,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x1003b14", new ByteDataType(), 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b14), addr(0x01003b14)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b14, 0x01003b14);@@ -689,7 +689,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.applyDataType("0x1003b1c", new UnicodeDataType(), 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);assertEquals(new AddressSet(addr(0x01003b1c), addr(0x01003b1d)),programMerge.getFilteredDifferences());mergeCodeUnitDifference(0x01003b1c, 0x01003b1d);@@ -721,7 +721,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createEquate("0x100643d", "Four", 0x4, 2);programBuilder2.createEquate("0x10064ee", "MY_EQUATE", 0x14, 2);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet();as.addRange(addr(0x100643d), addr(0x100643d));as.addRange(addr(0x100644d), addr(0x100644d));@@ -748,7 +748,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {SourceType.DEFAULT);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x01001000), addr(0x010017ff)));AddressSet as = new AddressSet(addr(0x01001028), addr(0x0100102b));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -770,7 +770,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {p2.endTransaction(transactionID, true);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x0100299e), addr(0x01002a90)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x0100299e), addr(0x01002a90)));AddressSet as = new AddressSet(addr(0x0100299e), addr(0x0100299e));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -792,7 +792,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {Function function2 = p2.getFunctionManager().getFunctionAt(addr(p2, 0x010048a3));programBuilder2.createLocalVariable(function2, null, DataType.DEFAULT, 0x1);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x010048a3), addr(0x010048a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -817,7 +817,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {function.addParameter(var, SourceType.USER_DEFINED);p2.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -845,7 +845,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {localVariables[4].setName("numAvailable", SourceType.USER_DEFINED);p1.endTransaction(transactionID1, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10059a3), addr(0x10059a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -873,7 +873,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {function1.removeVariable(localVariables[4]);p1.endTransaction(transactionID1, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10059a3), addr(0x10059a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -909,7 +909,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {localVariables2[0].setDataType(new PointerDataType(), SourceType.DEFAULT);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10059a3), addr(0x10059a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -948,7 +948,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {function2.setName("Function2239", SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x10048a3), addr(0x10048a3));programMerge.setDiffFilter(new ProgramDiffFilter(@@ -972,7 +972,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {p2.endTransaction(transactionID, true);programMerge = new ProgramMergeManager(p1, p2,- new AddressSet(addr(0x10030d2), addr(0x10030d7)), TaskMonitor.DUMMY);+ new AddressSet(addr(0x10030d2), addr(0x10030d7)));AddressSet as = new AddressSet(addr(0x10030d2), addr(0x10030d2));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -993,7 +993,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {p1.getFunctionManager().removeFunction(addr(0x10030d2));p1.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x10030d2), addr(0x10030d2));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));programMerge.setMergeFilter(@@ -1016,7 +1016,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {function.getParameter(0).setName("value", SourceType.USER_DEFINED);p1.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x01002cf5), addr(0x01002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1038,7 +1038,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {AddressSet as = new AddressSet();as.addRange(addr(0x010032d5), addr(0x010033f5));- programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, as);AddressSet diffAs = new AddressSet();// For now, we are not allowing you to set the parameter offset or local size outright.// diffAs.addRange(addr(0x010032d5), addr(0x010032d5));@@ -1063,7 +1063,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {function.removeParameter(0);p1.endTransaction(transactionID, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x01002cf5), addr(0x01002cf5));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1098,7 +1098,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {f2p0.setDataType(DataType.DEFAULT, SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x010059a3), addr(0x010059a3));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -1146,7 +1146,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {function2.setReturnType(new CharDataType(), SourceType.USER_DEFINED);p2.endTransaction(transactionID2, true);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(0x010048a3), addr(0x010048a3));diffAs.addRange(addr(0x010059a3), addr(0x010059a3));@@ -1178,7 +1178,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {symtab2.createLabel(addr(0x1002973), "TWO", SourceType.USER_DEFINED);AddressSet as;AddressSet limitedAddrSet = new AddressSet(addr(0x1002950), addr(0x100299b));- programMerge = new ProgramMergeManager(p1, p2, limitedAddrSet, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2, limitedAddrSet);as = new AddressSet();as.addRange(addr(0x100295d), addr(0x100295d));@@ -1207,7 +1207,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemoryReference("0x1002d0f", "0x1006488", RefType.READ,SourceType.USER_DEFINED, 1);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet();as.addRange(addr(0x1002d0f), addr(0x1002d10));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -1232,7 +1232,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemoryReference("0x1002d03", "0x1006488", RefType.READ,SourceType.USER_DEFINED, -1);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));as.add(addr(0x1002d03), addr(0x1002d03));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));@@ -1254,7 +1254,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemoryReference("0x1002d25", "0x1006488", RefType.READ,SourceType.USER_DEFINED, 1);- programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x1002d25), addr(0x1002d26));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));programMerge.setMergeFilter(@@ -1282,7 +1282,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemoryReference("0x1002cfc", "0x1006488", RefType.READ,SourceType.USER_DEFINED, 0);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));programMerge.setMergeFilter(@@ -1306,7 +1306,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemoryReference("0x1002cfc", "0x1006488", RefType.READ,SourceType.USER_DEFINED, 0);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));programMerge.setMergeFilter(@@ -1329,7 +1329,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.createMemoryReference("0x1002cfc", "0x1006488", RefType.READ,SourceType.USER_DEFINED, 0);- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));programMerge.setMergeFilter(@@ -1353,7 +1353,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.setBytes("0x01002cf8", "3b 74 24 0c", true);// p1 & p2 differ at byte at 0x01002cfb.- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BYTE_DIFFS | ProgramDiffFilter.CODE_UNIT_DIFFS));programMerge.setMergeFilter(@@ -1382,7 +1382,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {programBuilder2.setBytes("0x01002cf8", "3b 74 24 0c", true);// p1 & p2 differ at byte at 0x01002cfb.- programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);+ programMerge = new ProgramMergeManager(p1, p2);programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BYTE_DIFFS | ProgramDiffFilter.CODE_UNIT_DIFFS));programMerge.setMergeFilter(diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ThunkFunctionMergeTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ThunkFunctionMergeTest.javaindex 66ba7a2b13..fa58c6bf56 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ThunkFunctionMergeTest.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ThunkFunctionMergeTest.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.@@ -143,7 +143,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs = new AddressSet();programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));@@ -210,7 +210,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs =new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));@@ -265,7 +265,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));@@ -318,7 +318,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));@@ -394,7 +394,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));@@ -474,7 +474,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(latestProgram, "01001984"), addr(latestProgram, "01001984"));@@ -556,7 +556,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTestAddressSetView as = latestProgram.getMemory();ProgramMergeManager programMerge =- new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);+ new ProgramMergeManager(latestProgram, myProgram, as);AddressSet diffAs = new AddressSet();diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));diff --git a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/CreateDiffTask.java b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/CreateDiffTask.javaindex f3eee6b289..c62c577ef6 100644--- a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/CreateDiffTask.java+++ b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/CreateDiffTask.java@@ -44,16 +44,10 @@ class CreateDiffTask extends Task {private DiffApplySettingsProvider diffApplySettingsProvider;private boolean isLimitedToSelection;- /**- * Construct new LoadDiffTask that loads the dialog with the two- * programs and indicates their differences. The differences should be- * restricted to the limitedAddressSet.- *- */CreateDiffTask(ProgramDiffPlugin plugin, Program program1, Program program2,AddressSetView limitedAddressSet, boolean isLimitedToSelection,ProgramDiffFilter diffFilter, ProgramMergeFilter applyFilter) {- super("Checking Program Differences", true, false, false);+ super("Checking Program Differences", true, false, true);this.plugin = plugin;this.program1 = program1;this.program2 = program2;@@ -82,11 +76,11 @@ class CreateDiffTask extends Task {monitor.setMessage("Checking Program Differences");try {dc = new DiffController(program1, program2, limitedAddressSet, this.diffFilter,- this.applyFilter, monitor);+ this.applyFilter);AddressSetView filteredDifferences = dc.getFilteredDifferences(monitor);boolean noFilteredDifferencesFound = filteredDifferences.isEmpty();plugin.setDiffController(dc);- dc.differencesChanged(monitor);+ dc.differencesChanged();dc.setLocation(plugin.getCurrentAddress());monitor.setMessage("Done");Runnable r = () -> displayDifferencesMessageIfNecessary(noFilteredDifferencesFound);diff --git a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffController.java b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffController.javaindex 57e91586c3..f3e2194f0b 100644--- a/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffController.java+++ b/Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/DiffController.java@@ -1,13 +1,12 @@/* ###* IP: GHIDRA- * REVIEWED: YES** 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.@@ -16,6 +15,9 @@*/package ghidra.app.plugin.core.diff;+import java.util.ArrayList;+import java.util.List;+import ghidra.program.model.address.*;import ghidra.program.model.listing.Program;import ghidra.program.model.mem.MemoryAccessException;@@ -23,8 +25,6 @@ import ghidra.program.util.*;import ghidra.util.exception.CancelledException;import ghidra.util.task.TaskMonitor;-import java.util.ArrayList;-/*** DiffController controls a program Diff. It maintains address sets indicating* the differences between two programs. It can limit the determined differences@@ -41,8 +41,7 @@ public class DiffController {private AddressSetView p1LastDiffs;private AddressSetView p1LimitSet;private Address p1CurrentAddress;- private ArrayList<DiffControllerListener> listenerList =- new ArrayList<DiffControllerListener>();+ private List<DiffControllerListener> listenerList = new ArrayList<DiffControllerListener>();/*** Constructor@@ -54,13 +53,12 @@ public class DiffController {* The addresses in this set should be derived from p1.* @param diffFilter filter indicating difference types to mark.* @param mergeFilter filter indicating difference types to apply.- * @param monitor the progress monitor* @throws ProgramConflictException*/public DiffController(Program p1, Program p2, AddressSetView p1LimitSet,- ProgramDiffFilter diffFilter, ProgramMergeFilter mergeFilter, TaskMonitor monitor)+ ProgramDiffFilter diffFilter, ProgramMergeFilter mergeFilter)throws ProgramConflictException {- mergeEngine = new ProgramMergeManager(p1, p2, p1LimitSet, monitor);+ mergeEngine = new ProgramMergeManager(p1, p2, p1LimitSet);mergeEngine.setDiffFilter(diffFilter);mergeEngine.setMergeFilter(mergeFilter);this.p1LimitSet = p1LimitSet;@@ -181,7 +179,7 @@ public class DiffController {*/public void restrictResults(AddressSetView p1AddressSet, TaskMonitor monitor) {mergeEngine.restrictResults(p1AddressSet);- differencesChanged(monitor);+ differencesChanged();}/** Remove the restriction for the resulting differences to the indicated address set.@@ -190,7 +188,7 @@ public class DiffController {*/public void removeResultRestrictions(TaskMonitor monitor) {mergeEngine.removeResultRestrictions();- differencesChanged(monitor);+ differencesChanged();}/**@@ -224,7 +222,7 @@ public class DiffController {*/void ignore(AddressSetView p1AddressSet, TaskMonitor monitor) {mergeEngine.ignore(p1AddressSet);- differencesChanged(monitor);+ differencesChanged();}/**@@ -357,7 +355,7 @@ public class DiffController {if (keepIgnored) {mergeEngine.ignore(ignoreSet);}- differencesChanged(monitor);+ differencesChanged();}private void recomputeDiffs(TaskMonitor monitor) throws ProgramConflictException {@@ -372,7 +370,7 @@ public class DiffController {ProgramMergeFilter mergeFilter = mergeEngine.getMergeFilter();this.p1LimitSet = newLimitSet;- mergeEngine = new ProgramMergeManager(p1, p2, newLimitSet, monitor);+ mergeEngine = new ProgramMergeManager(p1, p2, newLimitSet);mergeEngine.setDiffFilter(diffFilter);mergeEngine.setMergeFilter(mergeFilter);}@@ -392,7 +390,7 @@ public class DiffController {}}- public void differencesChanged(TaskMonitor monitor) {+ public void differencesChanged() {for (int i = 0; i < listenerList.size(); i++) {DiffControllerListener listener = listenerList.get(i);listener.differencesChanged(this);