mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-30 08:00:39 +00:00
GP-0: Using TaskMonitor.DUMMY instead of deprecated
TaskMonitorAdapter.DUMMY_MONITOR
This commit is contained in:
parent
c077c60942
commit
70a155cb70
@ -37,7 +37,7 @@ import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class FixLangId extends GhidraScript {
|
||||
|
||||
@ -78,7 +78,7 @@ public class FixLangId extends GhidraScript {
|
||||
return;
|
||||
}
|
||||
|
||||
dbh.save("Set Language", null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dbh.save("Set Language", null, TaskMonitor.DUMMY);
|
||||
dbh.close();
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* ###
|
||||
* 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.
|
||||
@ -14,6 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import db.DBConstants;
|
||||
import db.DBHandle;
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.framework.store.db.PackedDatabase;
|
||||
import ghidra.program.database.ProgramDB;
|
||||
@ -21,13 +25,7 @@ import ghidra.program.model.lang.LanguageNotFoundException;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.exception.VersionException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import db.DBConstants;
|
||||
import db.DBHandle;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class UpgradeTestProgramScript extends GhidraScript {
|
||||
|
||||
@ -80,7 +78,7 @@ public class UpgradeTestProgramScript extends GhidraScript {
|
||||
private boolean upgradeProgramArchive(File gzf) throws IOException, CancelledException,
|
||||
VersionException {
|
||||
|
||||
PackedDatabase db = PackedDatabase.getPackedDatabase(gzf, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
PackedDatabase db = PackedDatabase.getPackedDatabase(gzf, TaskMonitor.DUMMY);
|
||||
DBHandle dbh = null;
|
||||
ProgramDB p = null;
|
||||
try {
|
||||
|
@ -336,7 +336,7 @@ public class FunctionResultStateStackAnalysisCmd extends BackgroundCommand {
|
||||
ContextState returnState = results.getContextStates(seq).next();
|
||||
Varnode varnode =
|
||||
returnState.get(results.getStackPointerVarnode(),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
Varnode zero =
|
||||
new Varnode(addrFactory.getConstantSpace().getAddress(0),
|
||||
stackReg.getMinimumByteSize());
|
||||
@ -364,7 +364,7 @@ public class FunctionResultStateStackAnalysisCmd extends BackgroundCommand {
|
||||
}
|
||||
VarnodeOperation vop = (VarnodeOperation) vn;
|
||||
return ResultsState.simplify(vop.getPCodeOp(), vop.getInputValues(), addrFactory,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -225,7 +225,7 @@ public abstract class MergeManager implements DomainObjectMergeManager {
|
||||
* Convenience method for Junit tests.
|
||||
*/
|
||||
public boolean merge() throws CancelledException {
|
||||
return merge(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return merge(TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -15,15 +15,15 @@
|
||||
*/
|
||||
package ghidra.app.plugin.core.bookmark;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import ghidra.framework.cmd.Command;
|
||||
import ghidra.framework.model.DomainObject;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Command to delete some number of bookmarks.
|
||||
@ -205,7 +205,7 @@ public class BookmarkDeleteCmd implements Command {
|
||||
|
||||
private void deleteBookmarks(BookmarkManager mgr, String theType, String theCategory) {
|
||||
try {
|
||||
mgr.removeBookmarks(theType, theCategory, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.removeBookmarks(theType, theCategory, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// can't happen--dummy monitor
|
||||
@ -214,7 +214,7 @@ public class BookmarkDeleteCmd implements Command {
|
||||
|
||||
private void deleteBookmarks(BookmarkManager mgr, AddressSetView set) {
|
||||
try {
|
||||
mgr.removeBookmarks(set, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.removeBookmarks(set, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// can't happen--dummy monitor
|
||||
@ -223,7 +223,7 @@ public class BookmarkDeleteCmd implements Command {
|
||||
|
||||
private void deleteBookmarks(BookmarkManager mgr, AddressSetView set, String theType) {
|
||||
try {
|
||||
mgr.removeBookmarks(set, theType, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.removeBookmarks(set, theType, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// can't happen--dummy monitor
|
||||
@ -233,7 +233,7 @@ public class BookmarkDeleteCmd implements Command {
|
||||
private void deleteBookmarks(BookmarkManager mgr, AddressSetView set, String theType,
|
||||
String theCategory) {
|
||||
try {
|
||||
mgr.removeBookmarks(set, theType, theCategory, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.removeBookmarks(set, theType, theCategory, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// can't happen--dummy monitor
|
||||
|
@ -104,7 +104,7 @@ public class ClearCmd extends BackgroundCommand {
|
||||
throws CancelledException {
|
||||
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
Program program = (Program) obj;
|
||||
|
@ -244,7 +244,7 @@ public class SelectByFlowPlugin extends Plugin implements OptionsChangeListener
|
||||
Program program = context.getProgram();
|
||||
AddressSet selectionAddressSet = null;
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
monitor.setMessage("Computing Selection...");
|
||||
|
@ -74,7 +74,7 @@ public class ClassCategoryNode extends SymbolCategoryNode {
|
||||
Namespace parentNamespace = symbol.getParentNamespace();
|
||||
Symbol namespaceSymbol = parentNamespace.getSymbol();
|
||||
SymbolNode key = SymbolNode.createNode(namespaceSymbol, program);
|
||||
GTreeNode parentNode = findSymbolTreeNode(key, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
GTreeNode parentNode = findSymbolTreeNode(key, false, TaskMonitor.DUMMY);
|
||||
if (parentNode == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ public abstract class SymbolCategoryNode extends SymbolTreeNode {
|
||||
Namespace parentNamespace = symbol.getParentNamespace();
|
||||
Symbol namespaceSymbol = parentNamespace.getSymbol();
|
||||
SymbolNode key = SymbolNode.createNode(namespaceSymbol, program);
|
||||
parentNode = findSymbolTreeNode(key, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
parentNode = findSymbolTreeNode(key, false, TaskMonitor.DUMMY);
|
||||
if (parentNode == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.model.data.*;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.NotYetImplementedException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* A class to represent the <b><code>IMAGE_NT_HEADERS32</code></b> and
|
||||
@ -256,7 +256,7 @@ public class NTHeader implements StructConverter, OffsetValidator {
|
||||
fileHeader.processSymbols();
|
||||
|
||||
if (advancedProcess) {
|
||||
optionalHeader.processDataDirectories(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
optionalHeader.processDataDirectories(TaskMonitor.DUMMY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class OmfLoader extends AbstractProgramWrapperLoader {
|
||||
reader.setPointerIndex(0);
|
||||
OmfFileHeader scan;
|
||||
try {
|
||||
scan = OmfFileHeader.scan(reader, TaskMonitorAdapter.DUMMY_MONITOR, true);
|
||||
scan = OmfFileHeader.scan(reader, TaskMonitor.DUMMY, true);
|
||||
}
|
||||
catch (OmfException e) {
|
||||
throw new IOException("Bad header format: " + e.getMessage());
|
||||
|
@ -227,7 +227,7 @@ public class FieldHeader extends JTabbedPane implements ChangeListener {
|
||||
// try {
|
||||
// ClassSearcher.setXmlRestoreFile(GenericRunInfo.getUserDataDirPath() +
|
||||
// File.separatorChar + "TestClasses.xml");
|
||||
// ClassSearcher.search(false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
// ClassSearcher.search(false, TaskMonitor.DUMMY);
|
||||
// }
|
||||
// catch (CancelledException e) {
|
||||
// // can't happen--dummy monitor
|
||||
|
@ -483,7 +483,7 @@ public class GhidraProject {
|
||||
throw new DuplicateFileException("File already exists: " + file);
|
||||
}
|
||||
}
|
||||
program.saveToPackedFile(file, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
program.saveToPackedFile(file, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e1) {
|
||||
throw new IOException("Cancelled");
|
||||
|
@ -34,7 +34,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.mem.MemoryAccessException;
|
||||
import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import utility.application.ApplicationLayout;
|
||||
|
||||
/**
|
||||
@ -81,11 +81,11 @@ public class ProgramExaminer {
|
||||
messageLog = new MessageLog();
|
||||
try {
|
||||
program = AutoImporter.importByUsingBestGuess(provider, null, this, messageLog,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
if (program == null) {
|
||||
program = AutoImporter.importAsBinary(provider, null, defaultLanguage, null, this,
|
||||
messageLog, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
messageLog, TaskMonitor.DUMMY);
|
||||
}
|
||||
if (program == null) {
|
||||
throw new GhidraException(
|
||||
@ -172,7 +172,7 @@ public class ProgramExaminer {
|
||||
int txID = program.startTransaction("find images");
|
||||
try {
|
||||
EmbeddedMediaAnalyzer imageAnalyzer = new EmbeddedMediaAnalyzer();
|
||||
imageAnalyzer.added(program, program.getMemory(), TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
imageAnalyzer.added(program, program.getMemory(), TaskMonitor.DUMMY,
|
||||
messageLog);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
|
@ -278,7 +278,7 @@ public class ProgramMemoryUtil {
|
||||
TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
Memory memory = program.getMemory();
|
||||
@ -421,7 +421,7 @@ public class ProgramMemoryUtil {
|
||||
CodeUnit codeUnit, TaskMonitor monitor) {
|
||||
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
AddressSet toAddressSet =
|
||||
@ -490,7 +490,7 @@ public class ProgramMemoryUtil {
|
||||
int alignment, Address toAddress, TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
byte[] addressBytes = getDirectAddressBytes(program, toAddress);
|
||||
@ -634,7 +634,7 @@ public class ProgramMemoryUtil {
|
||||
Address toAddress, TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
if (monitor == null) {
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
Memory memory = program.getMemory();
|
||||
|
@ -744,7 +744,7 @@ public class ProgramMerge {
|
||||
// Use heavyweight disassembler for delay slotted instruction
|
||||
AddressSet restrictedSet = new AddressSet(addr);
|
||||
Disassembler disassembler =
|
||||
Disassembler.getDisassembler(program, TaskMonitorAdapter.DUMMY_MONITOR, null);
|
||||
Disassembler.getDisassembler(program, TaskMonitor.DUMMY, null);
|
||||
disassembler.disassemble(addr, restrictedSet, false);
|
||||
return program.getListing().getInstructionAt(addr);
|
||||
}
|
||||
@ -3725,7 +3725,7 @@ public class ProgramMerge {
|
||||
BookmarkManager bm2 = originProgram.getBookmarkManager();
|
||||
try {
|
||||
bm1.removeBookmarks(new AddressSet(resultAddress, resultAddress),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// DummyAdapter doesn't let cancel occur.
|
||||
|
@ -428,7 +428,7 @@ public class ProgramMergeManager {
|
||||
AddressSet p1CodeUnitSet = DiffUtility.getCodeUnitSet(p1MergeSet, this.program1);
|
||||
if (monitor == null) {
|
||||
// Create a "do nothing" task monitor that we can pass along.
|
||||
monitor = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
monitor = TaskMonitor.DUMMY;
|
||||
}
|
||||
|
||||
// Check that the needed memory addresses are available in the merge program.
|
||||
|
@ -492,7 +492,7 @@ public class ContextState {
|
||||
*/
|
||||
public Varnode get(int spaceID, Varnode offsetValue, int size) {
|
||||
try {
|
||||
return get(spaceID, offsetValue, size, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return get(spaceID, offsetValue, size, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
throw new AssertException(e); // unexpected
|
||||
@ -585,7 +585,7 @@ public class ContextState {
|
||||
*/
|
||||
public Varnode get(Varnode varnode) {
|
||||
try {
|
||||
return get(varnode, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return get(varnode, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
throw new AssertException(e); // unexpected
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.database.ProgramModifierListener;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Tests for the merge data type manager.
|
||||
@ -102,7 +102,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
Structure s =
|
||||
new StructureDataType(miscCat.getCategoryPath(), "My structure", 0);
|
||||
s.add(new ByteDataType());
|
||||
@ -174,7 +174,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(c, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(c, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -531,7 +531,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category miscCat = dtm.getCategory(new CategoryPath("/MISC"));
|
||||
Category destCat = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -556,7 +556,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -595,7 +595,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category miscCat = dtm.getCategory(new CategoryPath("/MISC"));
|
||||
Category destCat = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -620,7 +620,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -659,7 +659,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category miscCat = dtm.getCategory(new CategoryPath("/MISC"));
|
||||
Category destCat = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -684,7 +684,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -732,7 +732,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -777,7 +777,7 @@ public class CategoryMerge1Test extends AbstractDataTypeMergeTest {
|
||||
try {
|
||||
dtm.createCategory(path);
|
||||
dtm.getRootCategory().removeCategory("MyCategory",
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.database.ProgramModifierListener;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Tests for the merge data type manager.
|
||||
@ -57,7 +57,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
c.removeCategory("Category3", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category3", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -91,7 +91,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
c.removeCategory("Category3", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category3", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -109,7 +109,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
c.removeCategory("Category3", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category3", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -141,7 +141,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
c.removeCategory("Category4", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category4", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -221,7 +221,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
c.removeCategory("Category4", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category4", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -278,7 +278,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
try {
|
||||
c.removeCategory("Category4", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category4", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -312,7 +312,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -334,7 +334,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -373,7 +373,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -395,7 +395,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -432,7 +432,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category destCat =
|
||||
dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
destCat.moveCategory(miscCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
destCat.moveCategory(miscCat, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -454,7 +454,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -514,7 +514,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1"));
|
||||
try {
|
||||
c.removeCategory("Category2", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category2", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -574,7 +574,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1"));
|
||||
try {
|
||||
c.removeCategory("Category2", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category2", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -638,7 +638,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("Category1", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("Category1", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -701,7 +701,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("test");
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1"));
|
||||
try {
|
||||
c.removeCategory("Category2", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c.removeCategory("Category2", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -742,7 +742,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
root.moveCategory(c, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.moveCategory(c, TaskMonitor.DUMMY);
|
||||
c = root.getCategory(c.getName());
|
||||
c.setName("Other Category3");
|
||||
commit = true;
|
||||
@ -771,7 +771,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
c.setName("My Category3");
|
||||
miscCat.moveCategory(c, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
miscCat.moveCategory(c, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -821,7 +821,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
root.moveCategory(c, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.moveCategory(c, TaskMonitor.DUMMY);
|
||||
c = root.getCategory(c.getName());
|
||||
c.setName("Other Category3");
|
||||
commit = true;
|
||||
@ -850,7 +850,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
c.setName("My Category3");
|
||||
miscCat.moveCategory(c, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
miscCat.moveCategory(c, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -922,7 +922,7 @@ public class CategoryMerge2Test extends AbstractDataTypeMergeTest {
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
Category c = dtm.getCategory(new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
root.moveCategory(c, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.moveCategory(c, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.database.ProgramModifierListener;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test category merge conflicts.
|
||||
@ -463,7 +463,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
temp.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DataTypeDependencyException e) {
|
||||
@ -539,7 +539,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
temp.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DataTypeDependencyException e) {
|
||||
@ -613,7 +613,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
temp.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DataTypeDependencyException e) {
|
||||
@ -689,7 +689,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
temp.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DataTypeDependencyException e) {
|
||||
@ -768,7 +768,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
temp.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
// move Foo to /Category1
|
||||
Category c1 = dtm.getCategory(new CategoryPath("/Category1"));
|
||||
c1.moveDataType(foo, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
@ -856,7 +856,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
temp.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
// move Foo to /Category1
|
||||
Category c1 = dtm.getCategory(new CategoryPath("/Category1"));
|
||||
c1.moveDataType(foo, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
@ -915,7 +915,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
newMisc.moveDataType(dt, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
newMisc.setName("MISC");
|
||||
commit = true;
|
||||
}
|
||||
@ -993,7 +993,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
DataTypeManager dtm = program.getDataTypeManager();
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -1094,7 +1094,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
DataTypeManager dtm = program.getDataTypeManager();
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -1141,7 +1141,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
DataTypeManager dtm = program.getDataTypeManager();
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -1223,7 +1223,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
DataTypeManager dtm = program.getDataTypeManager();
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -1319,7 +1319,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
DataTypeManager dtm = program.getDataTypeManager();
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
try {
|
||||
root.removeCategory("MISC", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("MISC", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -1417,7 +1417,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
Category c2 = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
|
||||
try {
|
||||
c2.moveCategory(misc, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c2.moveCategory(misc, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -1441,7 +1441,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
|
||||
try {
|
||||
for (DataType dt : dts) {
|
||||
misc.remove(dt, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
misc.remove(dt, TaskMonitor.DUMMY);
|
||||
}
|
||||
commit = true;
|
||||
}
|
||||
@ -1484,7 +1484,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
|
||||
try {
|
||||
for (DataType dt : dts) {
|
||||
misc.remove(dt, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
misc.remove(dt, TaskMonitor.DUMMY);
|
||||
}
|
||||
commit = true;
|
||||
}
|
||||
@ -1506,7 +1506,7 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
Category c2 = dtm.getCategory(new CategoryPath("/Category1/Category2"));
|
||||
|
||||
try {
|
||||
c2.moveCategory(misc, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c2.moveCategory(misc, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -1574,10 +1574,10 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
try {
|
||||
Category temp = dtm.createCategory(new CategoryPath("/A_TEMP"));
|
||||
for (Category cat : cats) {
|
||||
temp.moveCategory(cat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
temp.moveCategory(cat, TaskMonitor.DUMMY);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("A", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("A", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (Exception e) {
|
||||
@ -1651,10 +1651,10 @@ public class CategoryMerge4Test extends AbstractDataTypeMergeTest {
|
||||
try {
|
||||
Category temp = dtm.createCategory(new CategoryPath("/A_TEMP"));
|
||||
for (Category cat : cats) {
|
||||
temp.moveCategory(cat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
temp.moveCategory(cat, TaskMonitor.DUMMY);
|
||||
}
|
||||
Category root = dtm.getCategory(CategoryPath.ROOT);
|
||||
root.removeCategory("A", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("A", TaskMonitor.DUMMY);
|
||||
temp.setName("MY_A");
|
||||
commit = true;
|
||||
}
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
package ghidra.app.merge.datatypes;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@ -26,7 +25,7 @@ import ghidra.program.database.ProgramModifierListener;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Tests for the merge data type manager.
|
||||
@ -59,10 +58,10 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
// new CategoryPath("/Category1/Category2/Category4"));
|
||||
try {
|
||||
miscCat.setName("My Misc");
|
||||
cat1.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat1.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
DataTypeManager dtm = program.getDataTypeManager();
|
||||
dtm.createCategory(new CategoryPath("/newCat"));
|
||||
cat2.removeCategory("Category4", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat2.removeCategory("Category4", TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -91,7 +90,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category4"));
|
||||
try {
|
||||
miscCat.setName("Some Other Misc");
|
||||
cat4.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat4.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -142,7 +141,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
miscCat.setName("My Misc");
|
||||
cat1.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat1.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -171,7 +170,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category4"));
|
||||
try {
|
||||
miscCat.setName("Some Other Misc");
|
||||
cat4.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat4.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -219,7 +218,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
miscCat.setName("My Misc");
|
||||
cat1.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat1.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -248,7 +247,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category4"));
|
||||
try {
|
||||
miscCat.setName("Some Other Misc");
|
||||
cat4.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat4.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -296,7 +295,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
miscCat.setName("My Misc");
|
||||
cat1.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat1.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -325,7 +324,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category4"));
|
||||
try {
|
||||
miscCat.setName("Some Other Misc");
|
||||
cat4.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat4.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -388,7 +387,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category3"));
|
||||
try {
|
||||
miscCat.setName("My Misc");
|
||||
cat1.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat1.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
@ -417,7 +416,7 @@ public class CategoryMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
new CategoryPath("/Category1/Category2/Category4"));
|
||||
try {
|
||||
miscCat.setName("Some Other Misc");
|
||||
cat4.moveCategory(cat3, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat4.moveCategory(cat3, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
catch (DuplicateNameException e) {
|
||||
|
@ -26,7 +26,7 @@ import ghidra.framework.main.*;
|
||||
import ghidra.program.database.OriginalProgramModifierListener;
|
||||
import ghidra.program.database.ProgramDB;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* More data type merge tests.
|
||||
@ -109,7 +109,7 @@ public class DataTypeMerge8Test extends AbstractDataTypeMergeTest {
|
||||
transactionID = program.startTransaction("remove XYZ");
|
||||
try {
|
||||
// Remove the XYZ data type.
|
||||
dtm.remove(xyz, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dtm.remove(xyz, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
|
@ -22,7 +22,7 @@ import org.junit.Test;
|
||||
import ghidra.program.database.OriginalProgramModifierListener;
|
||||
import ghidra.program.database.ProgramDB;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Data type merge tests with fixup for data types added in My program.
|
||||
@ -85,7 +85,7 @@ public class DataTypeMergeFixupTest extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("delete inner struct");
|
||||
try {
|
||||
// Remove inner struct
|
||||
dtm.remove(inner, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dtm.remove(inner, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -245,7 +245,7 @@ public class DataTypeMergeFixupTest extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("delete inner struct");
|
||||
try {
|
||||
// Remove inner struct
|
||||
dtm.remove(inner, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dtm.remove(inner, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -360,7 +360,7 @@ public class DataTypeMergeFixupTest extends AbstractDataTypeMergeTest {
|
||||
int transactionID = program.startTransaction("delete inner struct");
|
||||
try {
|
||||
// Remove inner struct
|
||||
dtm.remove(inner, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dtm.remove(inner, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
|
@ -22,7 +22,7 @@ import org.junit.Test;
|
||||
import ghidra.program.database.ProgramDB;
|
||||
import ghidra.program.database.ProgramModifierListener;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Tests for merging data types.
|
||||
@ -93,7 +93,7 @@ public class DataTypeMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
|
||||
try {
|
||||
intStruct.add(new ByteDataType());// Change data type.
|
||||
dtm.remove(coolUnion, TaskMonitorAdapter.DUMMY_MONITOR);// Remove the data type.
|
||||
dtm.remove(coolUnion, TaskMonitor.DUMMY);// Remove the data type.
|
||||
charStruct.add(new FloatDataType());
|
||||
commit = true;
|
||||
}
|
||||
@ -122,7 +122,7 @@ public class DataTypeMergeUseForAllTest extends AbstractDataTypeMergeTest {
|
||||
"CharStruct");
|
||||
|
||||
try {
|
||||
dtm.remove(intStruct, TaskMonitorAdapter.DUMMY_MONITOR);// Remove the data type.
|
||||
dtm.remove(intStruct, TaskMonitor.DUMMY);// Remove the data type.
|
||||
coolUnion.delete(2);
|
||||
charStruct.add(new CharDataType());
|
||||
commit = true;
|
||||
|
@ -23,7 +23,7 @@ import ghidra.program.database.ProgramDB;
|
||||
import ghidra.program.database.ProgramModifierListener;
|
||||
import ghidra.program.model.address.AddressSet;
|
||||
import ghidra.program.model.data.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test the merge of the versioned program's code units when bytes
|
||||
@ -1170,7 +1170,7 @@ public class CodeUnitMergeManager4Test extends AbstractListingMergeManagerTest {
|
||||
Category cat = dtm.getCategory(catPath);
|
||||
assertNotNull(cat);
|
||||
// Delete category "cat1".
|
||||
root.removeCategory("cat1", TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
root.removeCategory("cat1", TaskMonitor.DUMMY);
|
||||
cat = dtm.getCategory(catPath);
|
||||
assertNull(cat);
|
||||
//Add "cat1" category back
|
||||
|
@ -31,7 +31,7 @@ import ghidra.program.model.listing.FunctionManager;
|
||||
import ghidra.program.model.symbol.SourceType;
|
||||
import ghidra.program.util.ProgramDiff;
|
||||
import ghidra.program.util.ProgramDiffFilter;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test the multi-user merge of thunk functions.
|
||||
@ -171,12 +171,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -231,12 +231,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -332,12 +332,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -437,12 +437,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -524,12 +524,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -610,12 +610,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -697,12 +697,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -785,12 +785,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -899,12 +899,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1013,12 +1013,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1117,12 +1117,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1216,12 +1216,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1315,12 +1315,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1400,7 +1400,7 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1476,7 +1476,7 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1570,12 +1570,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1674,12 +1674,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1784,12 +1784,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
addr(resultProgram, TWO_PARAMS_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1893,12 +1893,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
addr(resultProgram, TWO_PARAMS_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1984,12 +1984,12 @@ public class FunctionMergerThunk2Test extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
|
@ -36,7 +36,7 @@ import ghidra.program.model.symbol.ExternalLocation;
|
||||
import ghidra.program.model.symbol.SourceType;
|
||||
import ghidra.program.util.ProgramDiff;
|
||||
import ghidra.program.util.ProgramDiffFilter;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test the multi-user merge of thunk functions.
|
||||
@ -122,11 +122,11 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
AddressSet expectedDifferences = new AddressSet();
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -191,11 +191,11 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
AddressSet expectedDifferences = new AddressSet(entryAddress, entryAddress);
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -338,12 +338,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -424,12 +424,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -511,12 +511,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -601,12 +601,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -692,12 +692,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
expectedDifferences.add(addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -783,12 +783,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
expectedDifferences.add(addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1531,12 +1531,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1620,12 +1620,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1714,12 +1714,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
AddressSet expectedDifferences = new AddressSet(addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -1811,12 +1811,12 @@ public class FunctionMergerThunkTest extends AbstractExternalMergerTest {
|
||||
new AddressSet(addr(resultProgram, THUNK_A_ENTRY), addr(resultProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
|
@ -31,7 +31,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.SourceType;
|
||||
import ghidra.program.util.ProgramDiff;
|
||||
import ghidra.program.util.ProgramDiffFilter;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class FunctionMergerUseForAllTest extends AbstractListingMergeManagerTest {
|
||||
|
||||
@ -138,12 +138,12 @@ public class FunctionMergerUseForAllTest extends AbstractListingMergeManagerTest
|
||||
expectedDifferences.add(addr(resultProgram, THUNK_B_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -178,12 +178,12 @@ public class FunctionMergerUseForAllTest extends AbstractListingMergeManagerTest
|
||||
expectedDifferences.add(addr(resultProgram, THUNK_B_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -299,12 +299,12 @@ public class FunctionMergerUseForAllTest extends AbstractListingMergeManagerTest
|
||||
expectedDifferences.add(addr(resultProgram, THUNK_B_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
@ -345,12 +345,12 @@ public class FunctionMergerUseForAllTest extends AbstractListingMergeManagerTest
|
||||
expectedDifferences.add(addr(resultProgram, THUNK_B_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(resultProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
|
||||
executeMerge(ASK_USER);
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
package ghidra.app.merge.tree;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.awt.Container;
|
||||
|
||||
@ -25,7 +24,7 @@ import javax.swing.*;
|
||||
import ghidra.app.merge.*;
|
||||
import ghidra.program.model.listing.ProgramChangeSet;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public abstract class AbstractProgramTreeMergeManagerTest extends AbstractMergeTest {
|
||||
|
||||
@ -52,7 +51,7 @@ public abstract class AbstractProgramTreeMergeManagerTest extends AbstractMergeT
|
||||
if (option >= 0) {
|
||||
programTreeMergeManager.setConflictResolution(option);
|
||||
}
|
||||
programTreeMergeManager.merge(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programTreeMergeManager.merge(TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
protected void merge() throws Exception {
|
||||
|
@ -134,7 +134,7 @@ public class AutoAnalysisWorkerTest extends AbstractGhidraHeadedIntegrationTest
|
||||
schedule(mgr, new SetTestPropertyCommand("p1", 500), 10);
|
||||
|
||||
try {
|
||||
mgr.scheduleWorker(worker, null, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.scheduleWorker(worker, null, false, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (Exception e) {
|
||||
failWithException("Unexpected exception", e);
|
||||
@ -158,7 +158,7 @@ public class AutoAnalysisWorkerTest extends AbstractGhidraHeadedIntegrationTest
|
||||
schedule(mgr, new SetTestPropertyCommand("p1", 500), 10);
|
||||
|
||||
try {
|
||||
mgr.scheduleWorker(worker, null, true, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.scheduleWorker(worker, null, true, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (Exception e) {
|
||||
failWithException("Unexpected exception", e);
|
||||
@ -284,7 +284,7 @@ public class AutoAnalysisWorkerTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
Runnable r = () -> {
|
||||
try {
|
||||
mgr.scheduleWorker(worker, null, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
mgr.scheduleWorker(worker, null, false, TaskMonitor.DUMMY);
|
||||
Assert.fail("Expected UnsupportedOperationException");
|
||||
}
|
||||
catch (UnsupportedOperationException e1) {
|
||||
@ -468,7 +468,7 @@ public class AutoAnalysisWorkerTest extends AbstractGhidraHeadedIntegrationTest
|
||||
AutoAnalysisManager mgr = AutoAnalysisManager.getAnalysisManager((Program) obj);
|
||||
try {
|
||||
return mgr.scheduleWorker(worker, null, analyzeChanges,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (Exception e) {
|
||||
error = e;
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
package ghidra.app.plugin.core.datawindow;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.awt.Dimension;
|
||||
|
||||
@ -30,7 +29,7 @@ import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.test.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class DataWindowPluginTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
private TestEnv env;
|
||||
@ -108,7 +107,7 @@ public class DataWindowPluginTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
int id = program.startTransaction(testName.getMethodName());
|
||||
try {
|
||||
program.getListing().clearAll(false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
program.getListing().clearAll(false, TaskMonitor.DUMMY);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(id, true);
|
||||
|
@ -30,7 +30,7 @@ import ghidra.program.util.ProgramSelection;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.DataConverter;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public abstract class AbstractFollowFlowTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -71,7 +71,7 @@ public abstract class AbstractFollowFlowTest extends AbstractGhidraHeadedIntegra
|
||||
|
||||
AddressSetView getFlowsFrom(AddressSet startSet, FlowType[] excludedFlows) {
|
||||
FollowFlow followFlow = new FollowFlow(program, startSet, excludedFlows);
|
||||
return followFlow.getFlowAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return followFlow.getFlowAddressSet(TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
AddressSetView getFlowsTo(int startAddressOffset, FlowType[] excludedFlows) {
|
||||
@ -84,7 +84,7 @@ public abstract class AbstractFollowFlowTest extends AbstractGhidraHeadedIntegra
|
||||
|
||||
AddressSetView getFlowsTo(AddressSet startSet, FlowType[] excludedFlows) {
|
||||
FollowFlow followFlow = new FollowFlow(program, startSet, excludedFlows);
|
||||
return followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
FlowType[] followAllFlows() {
|
||||
|
@ -15,15 +15,16 @@
|
||||
*/
|
||||
package ghidra.app.plugin.core.select.flow;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.address.AddressSet;
|
||||
import ghidra.program.model.block.FollowFlow;
|
||||
import ghidra.program.model.symbol.FlowType;
|
||||
import ghidra.test.ToyProgramBuilder;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
|
||||
import org.junit.*;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
|
||||
@ -89,7 +90,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -130,7 +131,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(14), address(17));
|
||||
@ -171,7 +172,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -213,7 +214,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(4), address(5));
|
||||
@ -255,7 +256,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -292,7 +293,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(13));
|
||||
@ -329,7 +330,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -369,7 +370,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -410,7 +411,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -451,7 +452,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(17));
|
||||
@ -493,7 +494,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(10), address(15));
|
||||
@ -535,7 +536,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FlowType[] flowsNotToFollow = new FlowType[] {};
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, flowsNotToFollow); // FollowAllFlows
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(4), address(5));
|
||||
@ -576,7 +577,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
Address addr = address(16);
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, followOnlyPointers());
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(16), address(17));
|
||||
@ -620,7 +621,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
Address addr = address(16);
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, followAllFlows());
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(4), address(5));
|
||||
@ -665,7 +666,7 @@ public class FollowDelaySlotFlowTest extends AbstractFollowFlowTest {
|
||||
Address addr = address(16);
|
||||
AddressSet addressSet = new AddressSet(addr);
|
||||
FollowFlow followFlow = new FollowFlow(program, addressSet, followAllFlows());
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSet flowAddresses = followFlow.getFlowToAddressSet(TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedAddresses = new AddressSet();
|
||||
expectedAddresses.add(address(4), address(5));
|
||||
|
@ -30,7 +30,7 @@ import ghidra.program.model.scalar.Scalar;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.test.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class GhidraScriptRealProgramTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -417,7 +417,7 @@ public class GhidraScriptRealProgramTest extends AbstractGhidraHeadedIntegration
|
||||
// test stub
|
||||
}
|
||||
};
|
||||
script.set(state, TaskMonitorAdapter.DUMMY_MONITOR, null);
|
||||
script.set(state, TaskMonitor.DUMMY, null);
|
||||
return script;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ import ghidra.framework.protocol.ghidra.GhidraURL;
|
||||
import ghidra.program.database.ProgramBuilder;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.test.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* test for creating a new empty tool with the new front end
|
||||
@ -367,7 +367,7 @@ public class CreateDomainObjectTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
DomainFolder f = df.createFolder(to);
|
||||
DomainFolder f2 = df.getFolder(from);
|
||||
f2.copyTo(f, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
f2.copyTo(f, TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
private static void moveTree(Project proj, String from, String to) throws Exception {
|
||||
|
@ -782,7 +782,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testIteratorForComments() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
@ -810,10 +810,10 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testIteratorForCommentType() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
mem.createInitializedBlock("test2", addr(5000), 100, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(i + 10));
|
||||
@ -850,7 +850,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testIteratorForCommentsBackwards() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(90));
|
||||
@ -891,7 +891,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testGetPropertyCodeUnitIterator() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
for (int i = 0; i < 20; i++) {
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(i + 10));
|
||||
@ -914,7 +914,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testGetPropertyCuIteratorBackwards() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("test", addr(0), 100, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
for (int i = 0; i < 20; i++) {
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(i));
|
||||
@ -936,7 +936,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testGetPropertCUIteratorSet() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("bk1", addr(0), 200, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("bk1", addr(0), 200, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
// addresses 10-19
|
||||
for (int i = 0; i < 20; i++) {
|
||||
@ -972,7 +972,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testPropertyCommentIterator() throws Exception {
|
||||
startTransaction();
|
||||
// mem.createUninitializedBlock("Test", addr(0), 200);
|
||||
mem.createInitializedBlock("bk1", addr(0), 200, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR,
|
||||
mem.createInitializedBlock("bk1", addr(0), 200, (byte) 0, TaskMonitor.DUMMY,
|
||||
false);
|
||||
for (int i = 0; i < 20; i++) {
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(i + 10));
|
||||
@ -1196,7 +1196,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testGetDataBackwards() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
listing.createData(addr(i), DataType.DEFAULT, 1);
|
||||
@ -1251,7 +1251,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testGetCompositeData() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
Structure struct = new StructureDataType("struct_1", 100);
|
||||
Structure struct2 = new StructureDataType("struct_2", 0);
|
||||
@ -1306,7 +1306,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testGetCompositeDataStartingAt() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
Structure struct = new StructureDataType("struct_1", 100);
|
||||
Structure struct2 = new StructureDataType("struct_2", 0);
|
||||
@ -1360,7 +1360,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testGetCompositeDataInSet() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
Structure struct = new StructureDataType("struct_1", 100);
|
||||
Structure struct2 = new StructureDataType("struct_2", 0);
|
||||
@ -1418,7 +1418,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
startTransaction();
|
||||
mem.removeBlock(mem.getBlock(addr(1000)), monitor);
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
listing.createData(addr(i), new ByteDataType(), 1);
|
||||
@ -1491,7 +1491,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
startTransaction();
|
||||
mem.removeBlock(mem.getBlock(addr(1000)), monitor);
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
listing.createData(addr(i), DataType.DEFAULT, 1);
|
||||
@ -1553,7 +1553,7 @@ public class CodeUnitIteratorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testGetDefinedDataSetIterator() throws Exception {
|
||||
startTransaction();
|
||||
mem.createInitializedBlock("test", addr(0), 1000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
listing.createData(addr(i), new ByteDataType(), 0);
|
||||
|
@ -29,7 +29,7 @@ import ghidra.program.model.listing.Data;
|
||||
import ghidra.program.model.listing.Listing;
|
||||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -117,7 +117,7 @@ public class ArrayTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
listing.getDataAt(addr(0x100));
|
||||
CategoryPath path = dt.getCategoryPath();
|
||||
assertNotNull(path);
|
||||
dt.getDataTypeManager().remove(dt, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dt.getDataTypeManager().remove(dt, TaskMonitor.DUMMY);
|
||||
|
||||
assertTrue(array.isDeleted());
|
||||
assertNull(dt.getDataTypeManager().getDataType(path, name));
|
||||
@ -215,7 +215,7 @@ public class ArrayTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
private void addBlock() throws Exception {
|
||||
Memory mem = program.getMemory();
|
||||
mem.createInitializedBlock("test", addr(0), 0x1000L, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
|
||||
private Address addr(int offset) {
|
||||
|
@ -218,7 +218,7 @@ public class CategoryTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
cat5.addDataType(s2, DataTypeConflictHandler.DEFAULT_HANDLER);
|
||||
|
||||
// move c4 to c5
|
||||
cat5.moveCategory(cat4, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
cat5.moveCategory(cat4, TaskMonitor.DUMMY);
|
||||
waitForPostedSwingRunnables();
|
||||
|
||||
assertEquals(new CategoryPath("/c1/c2/c5/c4"), cat4.getCategoryPath());
|
||||
@ -243,7 +243,7 @@ public class CategoryTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
Category c1 = root.createCategory("c1");
|
||||
Category c2 = c1.createCategory("c2");
|
||||
|
||||
c2.moveCategory(myCat, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
c2.moveCategory(myCat, TaskMonitor.DUMMY);
|
||||
|
||||
Category[] cats = c2.getCategories();
|
||||
assertEquals(1, cats.length);
|
||||
|
@ -41,7 +41,7 @@ import ghidra.program.util.ProgramChangeRecord;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.InvalidInputException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -75,7 +75,7 @@ public class FunctionDBTest extends AbstractGhidraHeadedIntegrationTest
|
||||
transactionID = program.startTransaction("Test");
|
||||
program.getMemory()
|
||||
.createInitializedBlock("test", addr(100), 500, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
functionManager = program.getFunctionManager();
|
||||
}
|
||||
|
||||
@ -1261,7 +1261,7 @@ public class FunctionDBTest extends AbstractGhidraHeadedIntegrationTest
|
||||
// delete the typedef data type
|
||||
localTransactionID = program.startTransaction("test");
|
||||
try {
|
||||
program.getDataTypeManager().remove(td, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
program.getDataTypeManager().remove(td, TaskMonitor.DUMMY);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(localTransactionID, true);
|
||||
|
@ -34,7 +34,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.exception.InvalidInputException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class FunctionManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -55,7 +55,7 @@ public class FunctionManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
transactionID = program.startTransaction("Test");
|
||||
program.getMemory()
|
||||
.createInitializedBlock("temp", addr(0), 10000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
|
||||
@After
|
||||
|
@ -27,7 +27,7 @@ import ghidra.program.model.lang.LanguageID;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.program.model.mem.MemoryConflictException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class AddressMapDB64BitTest extends AbstractAddressMapDBTestClass {
|
||||
|
||||
@ -80,7 +80,7 @@ public class AddressMapDB64BitTest extends AbstractAddressMapDBTestClass {
|
||||
// Block3 spans two (2) memory chunks and spans transition between positive and negative offset values
|
||||
// (base #2(end of block) and #3(start of block) allocated
|
||||
mem.createInitializedBlock("Block3", space.getAddress(0x7ffffffffff00000L), 0x200000,
|
||||
(byte) 0, TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
(byte) 0, TaskMonitor.DUMMY, false);
|
||||
|
||||
success = true;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.Lock;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class AddressRangeMapDBTest extends AbstractGhidraHeadedIntegrationTest
|
||||
implements ErrorHandler {
|
||||
@ -280,7 +280,7 @@ public class AddressRangeMapDBTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
try {
|
||||
map.moveAddressRange(addr(0x0100000000L), addr(0x0100001000L), 0x1000,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
Assert.fail();
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.model.address.AddressSpace;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.mem.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test for the BitMemoryBlock for the database implementation.
|
||||
@ -60,7 +60,7 @@ public class BitMappedMemoryBlockTest extends AbstractGhidraHeadedIntegrationTes
|
||||
transactionID = program.startTransaction("Test");
|
||||
|
||||
block = memory.createInitializedBlock("BYTE_BLOCK", byteSpace.getAddress(0), bytes.length,
|
||||
(byte) 0, TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
(byte) 0, TaskMonitor.DUMMY, false);
|
||||
memory.setBytes(block.getStart(), bytes);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package ghidra.program.database.module;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
@ -28,7 +28,7 @@ import ghidra.program.model.listing.ProgramModule;
|
||||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -82,27 +82,27 @@ public class Fragment20BitTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
Address start = addr("0000:0000");
|
||||
mem.createInitializedBlock("stdproc.c", start, 0x5EDA, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
start = addr("05ee:0000");
|
||||
mem.createInitializedBlock("scada.c", start, 0x5FAA, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
start = addr("0be9:0000");
|
||||
mem.createInitializedBlock("cseg03", start, 0x2A6, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
start = addr("0c14:0000");
|
||||
mem.createInitializedBlock("cseg04", start, 0xF04, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
start = addr("0d05:0000");
|
||||
mem.createInitializedBlock("cseg05", start, 0x3E0, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
start = addr("0d43:0000");
|
||||
mem.createInitializedBlock("cseg06", start, 0x10E8, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ import ghidra.program.model.mem.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.NotFoundException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -460,7 +460,7 @@ public class FragmentTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
try {
|
||||
MemoryBlock block =
|
||||
memory.createInitializedBlock(name, start, length, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
return block;
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ import ghidra.program.model.mem.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.exception.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test for Module.
|
||||
@ -731,7 +731,7 @@ public class ModuleTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
Address start = addr(offset);
|
||||
try {
|
||||
MemoryBlock block = memory.createInitializedBlock(name, start, length, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
return block;
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ import ghidra.program.model.mem.MemoryBlock;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test the tree manager.
|
||||
@ -232,7 +232,7 @@ public class TreeManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
assertEquals(5, r1FragCount);
|
||||
Address startAddr = b2.getStart();
|
||||
Address endAddr = b2.getEnd();
|
||||
treeManager.deleteAddressRange(startAddr, endAddr, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
treeManager.deleteAddressRange(startAddr, endAddr, TaskMonitor.DUMMY);
|
||||
r1FragCount = root.getChildren().length;
|
||||
r2FragCount = r2.getChildren().length;
|
||||
assertEquals(r1FragCount, r2FragCount);
|
||||
@ -257,7 +257,7 @@ public class TreeManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
// move b2 to 0x2000
|
||||
treeManager.moveAddressRange(b2.getStart(), getAddr(0x2000), b2.getSize(),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
Listing listing = program.getListing();
|
||||
root = listing.getRootModule("Test-One");
|
||||
@ -296,7 +296,7 @@ public class TreeManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
// move b1 to 0x5050
|
||||
treeManager.moveAddressRange(b1.getStart(), getAddr(0x5050), b1.getSize(),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
fragB1 = treeManager.getFragment("Test-One", getAddr(0x5050));
|
||||
assertNotNull(fragB1);
|
||||
@ -319,7 +319,7 @@ public class TreeManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
// move b2 to 0x5600
|
||||
treeManager.moveAddressRange(b2.getStart(), getAddr(0x5600), b2.getSize(),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
fragB2 = treeManager.getFragment("Test-One", getAddr(0x5600));
|
||||
assertNotNull(fragB2);
|
||||
@ -345,7 +345,7 @@ public class TreeManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
// move b1 to 0
|
||||
treeManager.moveAddressRange(b1.getStart(), getAddr(0), b1.getSize(),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
f2 = program.getListing().getFragment("Test-One", "f2");
|
||||
assertNotNull(f2);
|
||||
@ -371,7 +371,7 @@ public class TreeManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
Memory memory = program.getMemory();
|
||||
Address start = getAddr(offset);
|
||||
return memory.createInitializedBlock(name, start, length, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
|
||||
private Address getAddr(long offset) {
|
||||
|
@ -28,7 +28,7 @@ import ghidra.program.model.listing.CodeUnit;
|
||||
import ghidra.program.model.listing.Listing;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test the reference manager for the database implementation.
|
||||
@ -61,7 +61,7 @@ public class ReferenceManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
listing = program.getListing();
|
||||
transactionID = program.startTransaction("Test");
|
||||
program.getMemory().createInitializedBlock("code", addr(0), 10000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
|
||||
@After
|
||||
|
@ -27,7 +27,7 @@ import ghidra.program.model.lang.Register;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class RegisterVariableReferencesTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -58,7 +58,7 @@ public class RegisterVariableReferencesTest extends AbstractGhidraHeadedIntegrat
|
||||
functionMgr = program.getFunctionManager();
|
||||
transactionID = program.startTransaction("Test");
|
||||
program.getMemory().createInitializedBlock("code", addr(0), 10000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
|
||||
@After
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class StackVariableReferencesTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -56,7 +56,7 @@ public class StackVariableReferencesTest extends AbstractGhidraHeadedIntegration
|
||||
functionMgr = program.getFunctionManager();
|
||||
transactionID = program.startTransaction("Test");
|
||||
program.getMemory().createInitializedBlock("code", addr(0), 10000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
|
||||
@After
|
||||
|
@ -28,7 +28,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.mem.MemoryBlock;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
*/
|
||||
@ -259,7 +259,7 @@ public class NamespaceManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
MemoryBlock[] blocks = program.getMemory().getBlocks();
|
||||
namespaceManager.moveAddressRange(blocks[0].getStart(), addr(0x1000), blocks[0].getSize(),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
set = new AddressSet();
|
||||
set.addRange(addr(0x1000), addr(0x1030));
|
||||
@ -292,7 +292,7 @@ public class NamespaceManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
f2.setParentNamespace(classNamespace);
|
||||
|
||||
namespaceManager.moveAddressRange(addr(0x300), addr(0x1000), 0x100,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
set = new AddressSet();
|
||||
set.addRange(addr(0), addr(0x30));
|
||||
@ -485,6 +485,6 @@ public class NamespaceManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
private void addBlock(String name, Address addr, int length) throws Exception {
|
||||
program.getMemory()
|
||||
.createInitializedBlock(name, addr, length, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public class PinnedSymbolTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.getBlock(addr(0));
|
||||
memory.moveBlock(block, addr(moveAmount), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.moveBlock(block, addr(moveAmount), TaskMonitor.DUMMY);
|
||||
|
||||
checkProcessorSymbolsInPlace(EXPECTED_PROCESSOR_SYMBOLS + EXPECTED_USER_SYMBOLS + 1);
|
||||
|
||||
@ -136,7 +136,7 @@ public class PinnedSymbolTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.getBlock(addr(0));
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
|
||||
checkProcessorSymbolsInPlace(EXPECTED_PROCESSOR_SYMBOLS + 1);
|
||||
|
||||
@ -308,7 +308,7 @@ public class PinnedSymbolTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
|
||||
private void createMemBlock() throws Exception {
|
||||
byte[] bytesOne = new byte[100];
|
||||
TaskMonitor m = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
TaskMonitor m = TaskMonitor.DUMMY;
|
||||
program.getMemory().createInitializedBlock("B1", addr(0),
|
||||
new ByteArrayInputStream(bytesOne), bytesOne.length, m, false);
|
||||
|
||||
|
@ -29,7 +29,7 @@ import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.InvalidInputException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class SymbolManagerSourceTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -52,7 +52,7 @@ public class SymbolManagerSourceTest extends AbstractGhidraHeadedIntegrationTest
|
||||
Memory memory = program.getMemory();
|
||||
transactionID = program.startTransaction("Test");
|
||||
memory.createInitializedBlock("test", addr(0), 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
st = program.getSymbolTable();
|
||||
refMgr = program.getReferenceManager();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ import ghidra.test.TestEnv;
|
||||
import ghidra.util.SystemUtilities;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.InvalidInputException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/*
|
||||
* Tests for the symbol manager that uses database.
|
||||
@ -67,7 +67,7 @@ public class SymbolManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
Memory memory = program.getMemory();
|
||||
transactionID = program.startTransaction("Test");
|
||||
memory.createInitializedBlock("test", addr(0), 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
st = program.getSymbolTable();
|
||||
refMgr = program.getReferenceManager();
|
||||
scopeMgr = program.getNamespaceManager();
|
||||
@ -417,7 +417,7 @@ public class SymbolManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
public void testGetDefaultFunctionInOverlaySymbolByName() throws Exception {
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock("ov_12", addr(0), 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, true);
|
||||
TaskMonitor.DUMMY, true);
|
||||
Address ovAddress = block.getStart();
|
||||
assertEquals("ov_12::00000000", ovAddress.toString());
|
||||
|
||||
@ -443,7 +443,7 @@ public class SymbolManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txID = p.startTransaction("test");
|
||||
Memory memory = p.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock("ov12", address, 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, true);
|
||||
TaskMonitor.DUMMY, true);
|
||||
Address ovAddress = block.getStart();
|
||||
assertEquals("ov12::00000000", ovAddress.toString());
|
||||
ovAddress = ovAddress.add(2);
|
||||
@ -1970,7 +1970,7 @@ public class SymbolManagerTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
Namespace namespace1 = st.createNameSpace(null, "MySpace1", SourceType.USER_DEFINED);
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock("ov_12", addr(0), 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, true);
|
||||
TaskMonitor.DUMMY, true);
|
||||
Address ovAddress = block.getStart();
|
||||
assertEquals("ov_12::00000000", ovAddress.toString());
|
||||
|
||||
|
@ -32,7 +32,7 @@ import ghidra.program.util.ChangeManager;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -271,7 +271,7 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
transactionID = -1;
|
||||
|
||||
DomainFile df =
|
||||
rootFolder.createFile("mynotepad", program, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
rootFolder.createFile("mynotepad", program, TaskMonitor.DUMMY);
|
||||
env.release(program);
|
||||
|
||||
AddressSet set = new AddressSet();
|
||||
@ -280,7 +280,7 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
set.addRange(getAddr(26), getAddr(0x30));
|
||||
|
||||
Program p =
|
||||
(Program) df.getDomainObject(this, true, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
(Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY);
|
||||
int txID = p.startTransaction("test");
|
||||
try {
|
||||
AddressSetPropertyMap pm = p.createAddressSetPropertyMap("MyMap");
|
||||
@ -291,13 +291,13 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
finally {
|
||||
p.endTransaction(txID, true);
|
||||
}
|
||||
df.save(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
df.save(TaskMonitor.DUMMY);
|
||||
p.release(this);
|
||||
|
||||
df = rootFolder.getFile("mynotepad");
|
||||
assertNotNull(df);
|
||||
|
||||
p = (Program) df.getDomainObject(this, true, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
p = (Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY);
|
||||
AddressSetPropertyMap pm = p.getAddressSetPropertyMap("MyMap");
|
||||
assertNotNull(pm);
|
||||
assertEquals(set, pm.getAddressSet());
|
||||
@ -362,7 +362,7 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
public void testMoveRange() throws Exception {
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock(".test", getAddr(0), 0x23, (byte) 0xa,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
AddressSet set = new AddressSet();
|
||||
set.addRange(getAddr(0), getAddr(0x10));
|
||||
@ -374,7 +374,7 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
assertEquals(set, pm.getAddressSet());
|
||||
|
||||
// move .test block to 0x1000
|
||||
memory.moveBlock(block, getAddr(0x1000), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.moveBlock(block, getAddr(0x1000), TaskMonitor.DUMMY);
|
||||
|
||||
// [0,10], [20, 22] should be moved
|
||||
// [23,30] should not be moved
|
||||
@ -397,7 +397,7 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
public void testDeleteBlockRange() throws Exception {
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock(".test", getAddr(5), 0x20, (byte) 0xa,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
AddressSet set = new AddressSet();
|
||||
set.addRange(getAddr(0), getAddr(0x10));
|
||||
@ -406,7 +406,7 @@ public class AddressSetPropertyMapTest extends AbstractGhidraHeadedIntegrationTe
|
||||
AddressSetPropertyMap pm = program.createAddressSetPropertyMap("MyMap");
|
||||
pm.add(set);
|
||||
// remove the block
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
|
||||
// [0,4], [25,30] should still exist
|
||||
// [5,24] should have been removed
|
||||
|
@ -32,7 +32,7 @@ import ghidra.program.util.ChangeManager;
|
||||
import ghidra.test.AbstractGhidraHeadlessIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
|
||||
@ -211,14 +211,14 @@ public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
transactionID = -1;
|
||||
|
||||
DomainFile df =
|
||||
rootFolder.createFile("mynotepad", program, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
rootFolder.createFile("mynotepad", program, TaskMonitor.DUMMY);
|
||||
env.release(program);
|
||||
|
||||
AddressSet set = new AddressSet();
|
||||
set.addRange(getAddr(0), getAddr(0x40));
|
||||
|
||||
Program p =
|
||||
(Program) df.getDomainObject(this, true, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
(Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY);
|
||||
int txID = p.startTransaction("test");
|
||||
int value = 0x11223344;
|
||||
int otherValue = 0x44332211;
|
||||
@ -231,13 +231,13 @@ public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
p.endTransaction(txID, true);
|
||||
}
|
||||
|
||||
df.save(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
df.save(TaskMonitor.DUMMY);
|
||||
p.release(this);
|
||||
|
||||
df = rootFolder.getFile("mynotepad");
|
||||
assertNotNull(df);
|
||||
|
||||
p = (Program) df.getDomainObject(this, true, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
p = (Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY);
|
||||
IntRangeMap map = p.getIntRangeMap("MyMap");
|
||||
assertNotNull(map);
|
||||
assertEquals(set, map.getAddressSet());
|
||||
@ -302,7 +302,7 @@ public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
public void testMoveRange() throws Exception {
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock(".test", getAddr(0), 0x23, (byte) 0xa,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
AddressSet set = new AddressSet();
|
||||
set.addRange(getAddr(0), getAddr(0x10));
|
||||
@ -315,7 +315,7 @@ public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
assertEquals(set, map.getAddressSet());
|
||||
|
||||
// move .test block to 0x1000
|
||||
memory.moveBlock(block, getAddr(0x1000), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.moveBlock(block, getAddr(0x1000), TaskMonitor.DUMMY);
|
||||
|
||||
// [0,10], [20, 22] should be moved
|
||||
// [23,30] should not be moved
|
||||
@ -338,7 +338,7 @@ public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
public void testDeleteBlockRange() throws Exception {
|
||||
Memory memory = program.getMemory();
|
||||
MemoryBlock block = memory.createInitializedBlock(".test", getAddr(5), 0x20, (byte) 0xa,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
AddressSet set = new AddressSet();
|
||||
set.addRange(getAddr(0), getAddr(0x10));
|
||||
@ -348,7 +348,7 @@ public class IntRangeMapTest extends AbstractGhidraHeadlessIntegrationTest {
|
||||
int value = 0x11223344;
|
||||
map.setValue(set, value);
|
||||
// remove the block
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
|
||||
// [0,4], [25,30] should still exist
|
||||
// [5,24] should have been removed
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package ghidra.program.model.mem;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -29,7 +29,7 @@ import ghidra.program.database.ProgramBuilder;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class MemoryBufferImplTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
private Program program;
|
||||
@ -194,7 +194,7 @@ public class MemoryBufferImplTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
int id = program.startTransaction("add block");
|
||||
try {
|
||||
program.getMemory().createInitializedBlock(".test", start, is, 0x30000,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(id, true);
|
||||
|
@ -28,7 +28,7 @@ import ghidra.program.database.ProgramBuilder;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class WrappedMemoryBufferTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
private Program program;
|
||||
@ -345,7 +345,7 @@ public class WrappedMemoryBufferTest extends AbstractGhidraHeadedIntegrationTest
|
||||
int id = program.startTransaction("add block");
|
||||
try {
|
||||
program.getMemory().createInitializedBlock(".test", start, is, 0x30000,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(id, true);
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package ghidra.program.model.symbol;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
@ -30,7 +30,7 @@ import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.test.*;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.InvalidInputException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class SymbolUtilities1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
private ProgramDB program;
|
||||
@ -56,7 +56,7 @@ public class SymbolUtilities1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
Memory memory = program.getMemory();
|
||||
transactionID = program.startTransaction("Test");
|
||||
memory.createInitializedBlock("test", addr(0), 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
symbolTable = program.getSymbolTable();
|
||||
refMgr = program.getReferenceManager();
|
||||
listing = program.getListing();
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package ghidra.program.model.symbol;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
@ -29,7 +29,7 @@ import ghidra.program.model.mem.DumbMemBufferImpl;
|
||||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.test.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class SymbolUtilities2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
private ProgramDB program;
|
||||
@ -54,7 +54,7 @@ public class SymbolUtilities2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
Memory memory = program.getMemory();
|
||||
transactionID = program.startTransaction("Test");
|
||||
memory.createInitializedBlock("test", addr(0), 5000, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
symbolTable = program.getSymbolTable();
|
||||
refMgr = program.getReferenceManager();
|
||||
listing = program.getListing();
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
package ghidra.program.util;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.*;
|
||||
|
||||
@ -28,7 +27,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test the Diff of thunk functions.
|
||||
@ -160,11 +159,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
AddressSet expectedDifferences = new AddressSet();
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -227,12 +226,12 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, "0x1006674"), addr(latestProgram, "0x1006677"));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedRefDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSet expectedFunctionDifferences = new AddressSet();
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedFunctionDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -292,11 +291,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
// expectedDifferences.addRange(addr(latestProgram, ), addr());
|
||||
// // Perform the Diff and check the differences.
|
||||
// ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
// AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
// AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
// assertEquals(expectedDifferences, differences);
|
||||
// ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
// AddressSetView functionDifferences =
|
||||
// programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
// programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
// assertEquals(expectedDifferences, functionDifferences);
|
||||
// }
|
||||
|
||||
@ -361,11 +360,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
AddressSet expectedDifferences = new AddressSet();
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -431,11 +430,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -482,11 +481,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -533,11 +532,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -610,12 +609,12 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter functionFilter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(functionFilter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(functionFilter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -690,12 +689,12 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
addr(latestProgram, "0100199b"));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter functionFilter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(functionFilter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(functionFilter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -783,11 +782,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -857,11 +856,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -931,11 +930,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -1006,12 +1005,12 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter functionFilter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(functionFilter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(functionFilter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -1086,11 +1085,11 @@ public class ExternalFunctionDiffTest extends AbstractGhidraHeadedIntegrationTes
|
||||
AddressSet expectedDifferences = new AddressSet();
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ public class ProgramContextTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
Address start = addr(0);
|
||||
try {
|
||||
mem.createInitializedBlock("first", start, 100, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Assert.fail("TestProgramContext: couldn't add block to memory");
|
||||
|
@ -686,7 +686,7 @@ public class ProgramDiff1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programDiff.setFilter(new ProgramDiffFilter(ProgramDiffFilter.USER_DEFINED_DIFFS));
|
||||
AddressSetView expectedSet = (AddressSet) invokeInstanceMethod("adjustCodeUnitAddressSet",
|
||||
programDiff, new Class[] { AddressSetView.class, Listing.class, TaskMonitor.class },
|
||||
new Object[] { as, p1.getListing(), TaskMonitorAdapter.DUMMY_MONITOR });
|
||||
new Object[] { as, p1.getListing(), TaskMonitor.DUMMY });
|
||||
AddressSetView diffSet = programDiff.getDifferences(programDiff.getFilter(), null);
|
||||
assertEquals(expectedSet, diffSet);
|
||||
}
|
||||
|
@ -34,7 +34,8 @@ import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.ClassicSampleX86ProgramBuilder;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* <CODE>ProgramDiffTest</CODE> tests the <CODE>ProgramDiff</CODE> class
|
||||
@ -489,7 +490,7 @@ public class ProgramDiff4Test extends AbstractProgramDiffTest {
|
||||
AddressSetView diffs;
|
||||
|
||||
// before ignore it should detect diffs.
|
||||
diffs = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(diffs.contains(addr(p1, 0x01006420)));
|
||||
assertTrue(diffs.contains(addr(p1, 0x010059a3)));
|
||||
|
||||
@ -506,7 +507,7 @@ public class ProgramDiff4Test extends AbstractProgramDiffTest {
|
||||
|
||||
// ignore set is used by the Diff.
|
||||
diffs = programDiff.getDifferences(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertTrue(!diffs.contains(addr(p1, 0x01006420)) && !diffs.contains(addr(p1, 0x010059a3)));
|
||||
|
||||
// ignore set can be cleared.
|
||||
@ -534,7 +535,7 @@ public class ProgramDiff4Test extends AbstractProgramDiffTest {
|
||||
AddressSetView diffs;
|
||||
|
||||
// before limiting it should detect diffs.
|
||||
diffs = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(diffs.contains(addr(p1, 0x01006420)));
|
||||
assertTrue(diffs.contains(addr(p1, 0x010059a3)));
|
||||
|
||||
@ -547,7 +548,7 @@ public class ProgramDiff4Test extends AbstractProgramDiffTest {
|
||||
|
||||
// ignore set is used by the Diff.
|
||||
diffs = programDiff.getDifferences(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertTrue(!diffs.contains(addr(p1, 0x01006420)) && !diffs.contains(addr(p1, 0x010059a3)));
|
||||
}
|
||||
|
||||
@ -833,7 +834,7 @@ public class ProgramDiff4Test extends AbstractProgramDiffTest {
|
||||
AddressSetView diffs;
|
||||
|
||||
// before restricting it should detect diffs.
|
||||
diffs = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(diffs.contains(addr(p1, 0x01006420)));
|
||||
assertTrue(diffs.contains(addr(p1, 0x010059a3)));
|
||||
|
||||
@ -849,7 +850,7 @@ public class ProgramDiff4Test extends AbstractProgramDiffTest {
|
||||
|
||||
// ignore set is used by the Diff.
|
||||
diffs = programDiff.getDifferences(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertTrue(!diffs.contains(addr(p1, 0x01006420)) && !diffs.contains(addr(p1, 0x010059a3)));
|
||||
|
||||
// restricted set can be cleared.
|
||||
|
@ -25,9 +25,9 @@ import ghidra.program.model.data.*;
|
||||
import ghidra.program.model.lang.Register;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.ClassicSampleX86ProgramBuilder;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.test.ClassicSampleX86ProgramBuilder;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
@ -91,7 +91,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testCompareSameAddressSpaces() throws Exception {
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
}
|
||||
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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p3, TaskMonitor.DUMMY);
|
||||
assertNull(programMerge);
|
||||
}
|
||||
catch (ProgramConflictException e) {
|
||||
@ -124,7 +124,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
@Test
|
||||
public void testCompareSameMemory() throws Exception {
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
assertTrue("Memory in program 1 and program 2 should have been different.",
|
||||
!programMerge.memoryMatches());
|
||||
}
|
||||
@ -160,7 +160,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
*/
|
||||
@Test
|
||||
public void testDiffFilter() throws Exception {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
// 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 {
|
||||
*/
|
||||
@Test
|
||||
public void testMergeFilter() throws Exception {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
// Check that default filter has all difference types set.
|
||||
assertEquals(new ProgramMergeFilter(), programMerge.getMergeFilter());
|
||||
|
||||
@ -213,7 +213,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
*/
|
||||
@Test
|
||||
public void testGetPrograms() throws Exception {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as1 = new AddressSet();
|
||||
as1.add(new AddressRangeImpl(addr(0x100), addr(0x1ff)));
|
||||
as1.add(new AddressRangeImpl(addr(p1, 0x01001000), addr(p1, 0x010075ff)));
|
||||
@ -325,25 +325,25 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createLabel("0x01006420", "Function2");
|
||||
programBuilder2.createComment("0x010059a3", "There you have it.", CodeUnit.EOL_COMMENT);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));
|
||||
AddressSetView diffs;
|
||||
|
||||
// before limiting it should detect diffs.
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(diffs.contains(addr(p1, 0x01006420)));
|
||||
assertTrue(diffs.contains(addr(p1, 0x010059a3)));
|
||||
|
||||
// Program Diff only determines differences within the limited set.
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01002239), addr(0x0100248c)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01002239), addr(0x0100248c)), TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x01002239), addr(0x0100248c));
|
||||
assertEquals(as, programMerge.getLimitedAddressSet());
|
||||
|
||||
// limited set is used by the Diff.
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(!diffs.contains(addr(0x01006420)) && !diffs.contains(addr(0x010059a3)));
|
||||
}
|
||||
|
||||
@ -362,12 +362,12 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createLabel("0x01006420", "Function2");
|
||||
programBuilder2.createComment("0x010059a3", "There you have it.", CodeUnit.EOL_COMMENT);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));
|
||||
AddressSetView diffs;
|
||||
|
||||
// before ignore it should detect diffs.
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(diffs.contains(addr(0x01006420)));
|
||||
assertTrue(diffs.contains(addr(0x010059a3)));
|
||||
|
||||
@ -383,7 +383,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
assertEquals(as, programMerge.getIgnoreAddressSet());
|
||||
|
||||
// ignore set is used by the Diff.
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(!diffs.contains(addr(0x01006420)) && !diffs.contains(addr(0x010059a3)));
|
||||
}
|
||||
|
||||
@ -403,12 +403,12 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createLabel("0x01006420", "Function2");
|
||||
programBuilder2.createComment("0x010059a3", "There you have it.", CodeUnit.EOL_COMMENT);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));
|
||||
AddressSetView diffs;
|
||||
|
||||
// before restricting it should detect diffs.
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(diffs.contains(addr(0x01006420)));
|
||||
assertTrue(diffs.contains(addr(0x010059a3)));
|
||||
|
||||
@ -423,7 +423,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
// restricted set is used by the Diff.
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.ALL_DIFFS));
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
diffs = programMerge.getFilteredDifferences(TaskMonitor.DUMMY);
|
||||
assertTrue(!diffs.contains(addr(0x01006420)) && diffs.contains(addr(0x010059a3)));
|
||||
|
||||
// restricted set can be cleared.
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));
|
||||
@ -543,7 +543,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// printAddressSet(as);
|
||||
// printAddressSet(diffAs);
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));
|
||||
@ -560,7 +560,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));
|
||||
@ -577,7 +577,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));
|
||||
@ -595,7 +595,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(new AddressSet(), diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.REPLACE));
|
||||
@ -613,7 +613,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));
|
||||
@ -738,7 +738,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
diffAs = programMerge.getFilteredDifferences();
|
||||
as = new AddressSet();
|
||||
as.addRange(addr(0x01002040), addr(0x01002040));
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));
|
||||
@ -772,7 +772,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x0100248f), addr(0x0100248f)),
|
||||
programMerge.getFilteredDifferences());
|
||||
}
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));
|
||||
@ -790,7 +790,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));
|
||||
@ -808,7 +808,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(new AddressSet(), diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.COMMENT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.COMMENTS, ProgramMergeFilter.MERGE));
|
||||
@ -826,7 +826,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
as.addRange(addr(0x0100248f), addr(0x0100248f));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x0100248f), addr(0x0100248f)),
|
||||
programMerge.getFilteredDifferences());
|
||||
}
|
||||
@ -843,14 +843,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createExternalReference("0x0100102c", "ADVAPI32.dll", "IsTextUnicode", 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x0100102c), addr(0x0100102f));
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -865,14 +865,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createExternalReference("0x01001034", "myGDI32.dll", "SomePlace", 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x01001034), addr(0x01001037));
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -887,14 +887,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createExternalReference("0x01001038", "GDI32.dll", "ABC12345", 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x01001038), addr(0x0100103b));
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -909,14 +909,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createExternalReference("0x0100103c", "GDI32.dll", "XYZ", "0x77f4abcd", 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x0100103c), addr(0x0100103f));
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -930,14 +930,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createExternalReference("0x01001044", "GDI32.dll", "MNM", 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x01001044), addr(0x01001047));
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x1006443), addr(0x1006445));
|
||||
as.addRange(addr(0x1006446), addr(0x100644c));
|
||||
@ -980,7 +980,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// printAddressSet(as);
|
||||
// printAddressSet(programMerge.getFilteredDifferences());
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
// printAddressSet(programMerge.getFilteredDifferences());
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitor.DUMMY);
|
||||
AddressSet expectedDiffs = new AddressSet();
|
||||
expectedDiffs.addRange(addr(0x010018a6), addr(0x010018a6));
|
||||
expectedDiffs.addRange(addr(0x0100295a), addr(0x0100295a));
|
||||
@ -1043,7 +1043,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// printAddressSet(expectedDiffs);
|
||||
// printAddressSet(programMerge.getFilteredDifferences());
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(expectedDiffs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(expectedDiffs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1080,7 +1080,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.setStringProperty("0x10039f1", "testColor", "BLACK");
|
||||
programBuilder2.setStringProperty("0x10039f8", "testColor", "BLACK");
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x10018ae), addr(0x10018ae));
|
||||
as.addRange(addr(0x10018ce), addr(0x10018ce));
|
||||
@ -1095,7 +1095,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSetView diffSet = programMerge.getFilteredDifferences();
|
||||
assertEquals(expectedSet, diffSet);
|
||||
assertEquals(expectedSet, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(expectedSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(expectedSet, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet expectedDiffs = new AddressSet();
|
||||
expectedDiffs.addRange(addr(0x1002d16), addr(0x1002d16));
|
||||
expectedDiffs.addRange(addr(0x1002d18), addr(0x1002d18));
|
||||
@ -1159,7 +1159,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(programMerge.getFilteredDifferences(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(programMerge.getFilteredDifferences(), TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1187,13 +1187,13 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createLabel("1002d1d", "Foo", namespaceStr);
|
||||
p2.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x1002d1d), addr(0x1002d1d));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1209,14 +1209,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function1.insertParameter(0, var1, SourceType.USER_DEFINED);
|
||||
p1.endTransaction(transactionID1, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1243,14 +1243,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.insertParameter(0, var2, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1266,14 +1266,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.insertParameter(0, var2, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1308,14 +1308,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.addParameter(var2C, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1351,14 +1351,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.addParameter(var2C, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1394,14 +1394,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.addParameter(var2C, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1436,14 +1436,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
assertEquals(3, function2.getParameterCount());
|
||||
p2.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1459,14 +1459,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function1.addParameter(var1, SourceType.USER_DEFINED);
|
||||
p1.endTransaction(transactionID1, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1482,14 +1482,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.addParameter(var2, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1516,14 +1516,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.insertParameter(0, var2, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1532,14 +1532,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
// no params in program 1 or 2
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1556,14 +1556,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.insertParameter(0, var2, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1580,14 +1580,14 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function1.insertParameter(0, var1, SourceType.USER_DEFINED);
|
||||
p1.endTransaction(transactionID1, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1653,7 +1653,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder1.setRegisterValue(DR0_REGISTER, "0x1005e7b", "0x1005e83", 0x85678);
|
||||
|
||||
AddressSet as;
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
|
||||
as = new AddressSet();
|
||||
as.addRange(addr(0x010022d4), addr(0x010022e5));
|
||||
@ -1680,7 +1680,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// System.out.println("ProgramContext: as="+as.toString());
|
||||
// System.out.println("ProgramContext: diffAs="+diffAs.toString());
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, limitedAddrSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet as = new AddressSet(addr(0x100295d));
|
||||
AddressSet as2 = new AddressSet(addr(0x1002969));
|
||||
@ -1711,7 +1711,7 @@ public class ProgramMerge1Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as.union(as2), diffAs);
|
||||
|
||||
programMerge.merge(as2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as2, TaskMonitor.DUMMY);
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
Symbol[] symbols = symtab1.getSymbols(addr(0x1002969));
|
||||
assertEquals(1, symbols.length);
|
||||
|
@ -157,7 +157,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -168,7 +168,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x10058f7"), addr(p1, "0x10058f8"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -243,7 +243,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -254,7 +254,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x10058f7"), addr(p1, "0x10058f8"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -329,7 +329,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -340,7 +340,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x10058f7"), addr(p1, "0x10058f8"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -418,7 +418,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x10058f6"), addr(p1, "0x10058fa"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(new ProgramMergeFilter(
|
||||
@ -430,7 +430,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x10058f7"), addr(p1, "0x10058f8"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -491,7 +491,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -502,7 +502,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1004c1d"), addr(p1, "0x1004c1d"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// assertEquals(new AddressSet(p1.getAddressFactory()),
|
||||
// programMerge.getFilteredDifferences());
|
||||
@ -561,7 +561,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -572,7 +572,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1004c1d"), addr(p1, "0x1004c1d"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -650,7 +650,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -662,7 +662,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1002cf5"), addr(p1, "0x1002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -724,7 +724,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x1002998"), addr(p1, "0x1002a0c"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -735,7 +735,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x0100299e"), addr(p1, "0x0100299e"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
@ -805,7 +805,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x1002998"), addr(p1, "0x1002a0c"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -816,7 +816,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x0100299e"), addr(p1, "0x0100299e"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have a label with the old function name and a diff.
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
@ -899,7 +899,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
@ -913,7 +913,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
@ -997,7 +997,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
@ -1012,7 +1012,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
AddressSet diffSet = new AddressSet(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
@ -1103,7 +1103,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.FUNCTION_DIFFS | ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
@ -1118,7 +1118,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
AddressSet diffSet = new AddressSet(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
@ -1208,7 +1208,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
ProgramMergeFilter filter = new ProgramMergeFilter();
|
||||
@ -1222,7 +1222,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
@ -1306,7 +1306,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
ProgramMergeFilter filter = new ProgramMergeFilter();
|
||||
@ -1320,7 +1320,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
AddressSet diffSet = new AddressSet(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
@ -1410,7 +1410,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
ProgramMergeFilter filter = new ProgramMergeFilter();
|
||||
@ -1424,7 +1424,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
// P1 should now have function in namespace and no diffs.
|
||||
AddressSet diffSet = new AddressSet(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
@ -1515,7 +1515,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -1529,7 +1529,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
mergeSet.addRange(addr(p1, "0x010058f7"), addr(p1, "0x010058f7"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(addr(p1, "0x010058f7"), addr(p1, "0x010058f7")),
|
||||
programMerge.getFilteredDifferences());
|
||||
@ -1608,7 +1608,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -1620,7 +1620,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -1698,7 +1698,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -1711,7 +1711,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -1789,7 +1789,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -1801,7 +1801,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -1883,7 +1883,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -1896,7 +1896,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -1976,7 +1976,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -1989,7 +1989,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2069,7 +2069,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2082,7 +2082,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01002cf5"), addr(p1, "0x01002cf5"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2180,7 +2180,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txId = p1.startTransaction("Merge into Program 1");
|
||||
boolean commit = false;
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -2198,7 +2198,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.add(expectedDiffs);
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2316,7 +2316,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txId = p1.startTransaction("Merge into Program 1");
|
||||
boolean commit = false;
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -2332,7 +2332,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.add(expectedDiffs);
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(mergeSet, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2430,7 +2430,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2442,7 +2442,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2519,7 +2519,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2531,7 +2531,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2611,7 +2611,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2623,7 +2623,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2700,7 +2700,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2712,7 +2712,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2792,7 +2792,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2804,7 +2804,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2881,7 +2881,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2893,7 +2893,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -2971,7 +2971,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.FUNCTION_TAG_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -2983,7 +2983,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
Function f = fm1.getFunctionAt(entryPoint1);
|
||||
assertEquals("FUN_01004132", f.getName());
|
||||
@ -3062,7 +3062,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.FUNCTION_TAG_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -3074,7 +3074,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
Function f = fm1.getFunctionAt(entryPoint1);
|
||||
assertEquals("FUN_01004132", f.getName());
|
||||
@ -3154,7 +3154,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -3182,7 +3182,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -3293,7 +3293,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -3321,7 +3321,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -3432,7 +3432,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -3460,7 +3460,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -3547,7 +3547,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "TextOverlay::01001630"),
|
||||
addr(p1, "TextOverlay::0100182f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -3559,7 +3559,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "TextOverlay::01001630"), addr(p1, "TextOverlay::0100182f"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(addr1630, addr1630), programMerge.getFilteredDifferences());
|
||||
commit = true;
|
||||
@ -3646,7 +3646,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "TextOverlay::01001630"),
|
||||
addr(p1, "TextOverlay::0100182f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -3660,7 +3660,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "TextOverlay::01001630"), addr(p1, "TextOverlay::01001630"));
|
||||
mergeSet.addRange(addr(p1, "TextOverlay::01001646"), addr(p1, "TextOverlay::01001646"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -3745,7 +3745,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "TextOverlay::01001630"),
|
||||
addr(p1, "TextOverlay::0100182f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -3758,7 +3758,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "TextOverlay::01001630"), addr(p1, "TextOverlay::0100182f"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
commit = true;
|
||||
}
|
||||
finally {
|
||||
@ -3851,7 +3851,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txId = p1.startTransaction("Merge into Program 1");
|
||||
boolean commit = false;
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -3945,7 +3945,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txId = p1.startTransaction("Merge into Program 1");
|
||||
boolean commit = false;
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -3969,7 +3969,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
mergeSet.addRange(addr(p1, "Foo::0x0100017f"), addr(p1, "Foo::0x0100017f"));
|
||||
mergeSet.addRange(addr(p1, "Foo::0x01000180"), addr(p1, "Foo::0x01000180"));
|
||||
mergeSet.addRange(addr(p1, "Foo::0x010001ff"), addr(p1, "Foo::0x010001ff"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
|
||||
@ -4086,7 +4086,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txId = p1.startTransaction("Merge into Program 1");
|
||||
boolean commit = false;
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.SYMBOL_DIFFS | ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -4110,7 +4110,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
mergeSet.addRange(addr(p1, "Foo::0x0100017f"), addr(p1, "Foo::0x0100017f"));
|
||||
mergeSet.addRange(addr(p1, "Foo::0x01000180"), addr(p1, "Foo::0x01000180"));
|
||||
mergeSet.addRange(addr(p1, "Foo::0x010001ff"), addr(p1, "Foo::0x010001ff"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet newDiffs = new AddressSet();
|
||||
newDiffs.addRange(addr(p1, "Foo::0x01000030"), addr(p1, "Foo::0x01000030"));
|
||||
@ -4234,7 +4234,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
int txId = p1.startTransaction("Merge into Program 1");
|
||||
boolean commit = false;
|
||||
try {
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4247,7 +4247,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01001e4f"), addr(p1, "0x01001efc"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet newDiffs = new AddressSet();
|
||||
assertEquals(newDiffs, programMerge.getFilteredDifferences());
|
||||
@ -4342,7 +4342,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4355,7 +4355,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
mergeSet.addRange(addr(p1, "0x01004136"), addr(p1, "0x01004136"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
expectedDiffs.deleteRange(addr(p1, "0x01004136"), addr(p1, "0x01004136"));
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
@ -4444,7 +4444,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4459,7 +4459,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
mergeSet.addRange(addr(p1, "0x01004132"), addr(p1, "0x01004132"));
|
||||
mergeSet.addRange(addr(p1, "0x01004136"), addr(p1, "0x01004136"));
|
||||
mergeSet.addRange(addr(p1, "0x01004140"), addr(p1, "0x01004140"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -4553,7 +4553,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x01001a00"), addr(p1, "0x01006500"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4566,7 +4566,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1004130"), addr(p1, "0x1004160"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
@ -4629,7 +4629,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x8080"), addr(p1, "0x80d0"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
//programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4640,7 +4640,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
expectedDiffs.addRange(addr(p1, "0x80b4"), addr(p1, "0x80b7"));
|
||||
assertEquals(expectedDiffs, programMerge.getFilteredDifferences());
|
||||
|
||||
assertTrue(programMerge.merge(expectedDiffs, TaskMonitorAdapter.DUMMY_MONITOR));
|
||||
assertTrue(programMerge.merge(expectedDiffs, TaskMonitor.DUMMY));
|
||||
|
||||
}
|
||||
finally {
|
||||
@ -4758,7 +4758,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x1000"), addr(p1, "0x1000"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4769,7 +4769,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1000"), addr(p1, "0x1000"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedDiffsAfter = new AddressSet();
|
||||
assertEquals(expectedDiffsAfter, programMerge.getFilteredDifferences());
|
||||
@ -4856,7 +4856,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x1000"), addr(p1, "0x1000"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4867,7 +4867,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1000"), addr(p1, "0x1000"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedDiffsAfter = new AddressSet();
|
||||
assertEquals(expectedDiffsAfter, programMerge.getFilteredDifferences());
|
||||
@ -4968,7 +4968,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x1002249"), addr(p1, "0x1002249"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -4979,7 +4979,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1002249"), addr(p1, "0x1002249"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedDiffsAfter = new AddressSet();
|
||||
assertEquals(expectedDiffsAfter, programMerge.getFilteredDifferences());
|
||||
@ -5078,7 +5078,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet setToDiff = new AddressSet();
|
||||
setToDiff.addRange(addr(p1, "0x1002249"), addr(p1, "0x1002249"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -5089,7 +5089,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet mergeSet = new AddressSet();
|
||||
mergeSet.addRange(addr(p1, "0x1002249"), addr(p1, "0x1002249"));
|
||||
programMerge.merge(mergeSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(mergeSet, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedDiffsAfter = new AddressSet();
|
||||
assertEquals(expectedDiffsAfter, programMerge.getFilteredDifferences());
|
||||
@ -5180,7 +5180,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),
|
||||
addr(p1, "OtherOverlay::0100192f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
AddressSet expectedDiffs = new AddressSet();
|
||||
@ -5194,7 +5194,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.MERGE));
|
||||
programMerge.merge(expectedDiffs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(expectedDiffs, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedPostMergeDiffs = new AddressSet();
|
||||
expectedPostMergeDiffs.addRange(addr(p1, "SomeOverlay::01001630"),
|
||||
@ -5299,7 +5299,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),
|
||||
addr(p1, "OtherOverlay::0100192f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
AddressSet expectedDiffs = new AddressSet();
|
||||
@ -5313,7 +5313,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
|
||||
programMerge.merge(expectedDiffs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(expectedDiffs, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedPostMergeDiffs = new AddressSet();
|
||||
expectedPostMergeDiffs.addRange(addr(p1, "OtherOverlay::01001866"),
|
||||
@ -5415,7 +5415,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),
|
||||
addr(p1, "OtherOverlay::0100192f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
AddressSet expectedDiffs = new AddressSet();
|
||||
@ -5427,7 +5427,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.MERGE));
|
||||
programMerge.merge(expectedDiffs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(expectedDiffs, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedPostMergeDiffs = new AddressSet();
|
||||
expectedPostMergeDiffs.addRange(addr(p1, "SomeOverlay::01001630"),
|
||||
@ -5529,7 +5529,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
setToDiff.addRange(addr(p1, "OtherOverlay::01001630"),
|
||||
addr(p1, "OtherOverlay::0100192f"));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, setToDiff, TaskMonitor.DUMMY);
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.SYMBOL_DIFFS));
|
||||
AddressSet expectedDiffs = new AddressSet();
|
||||
@ -5541,7 +5541,7 @@ public class ProgramMerge2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
|
||||
programMerge.merge(expectedDiffs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(expectedDiffs, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet expectedPostMergeDiffs = new AddressSet();
|
||||
assertEquals(expectedPostMergeDiffs, programMerge.getFilteredDifferences());
|
||||
|
@ -24,10 +24,10 @@ import ghidra.program.model.data.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.mem.MemoryAccessException;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.ClassicSampleX86ProgramBuilder;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.ClassicSampleX86ProgramBuilder;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
@ -99,13 +99,13 @@ 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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, addrSet, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x100248c), addr(0x100248e));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.USER_DEFINED_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.PROPERTIES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -147,7 +147,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)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x1002306), addr(0x100232f)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x100230b), addr(0x100231c));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BOOKMARK_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -155,7 +155,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// printAddressSet(as);
|
||||
// printAddressSet(programMerge.getFilteredDifferences());
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -174,7 +174,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.BYTE_DIFFS | ProgramDiffFilter.CODE_UNIT_DIFFS));
|
||||
programMerge.setMergeFilter(new ProgramMergeFilter(
|
||||
@ -182,7 +182,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x01002cf8), addr(0x01002cfb));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet unMergableByteAddresses = new AddressSet();// None that can't merge.
|
||||
assertEquals(unMergableByteAddresses, programMerge.getFilteredDifferences());
|
||||
@ -211,7 +211,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.setBytes("0x1002b45", "8b");
|
||||
programBuilder2.setBytes("0x1002b49", "57");
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.BYTE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.BYTES, ProgramMergeFilter.REPLACE));
|
||||
@ -224,7 +224,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// Add the blocks that are in program2 and not program1 that are compatible.
|
||||
as.addRange(addr(0x00000400), addr(0x000004ff));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet unMergableByteAddresses = new AddressSet();
|
||||
// Add the bytes for the blocks that are in program1 and not in program2.
|
||||
@ -266,7 +266,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.CODE_UNIT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.CODE_UNITS, ProgramMergeFilter.REPLACE));
|
||||
@ -278,7 +278,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(addrSet, diffAs);
|
||||
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
union_a2.add(struct_b1);
|
||||
programBuilder2.applyDataType("0x01003b02", union_a2, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.CODE_UNIT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.CODE_UNITS, ProgramMergeFilter.REPLACE));
|
||||
@ -333,7 +333,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
assertEquals("union_1", u2.getName());
|
||||
assertEquals(false, u1.isEquivalent(u2));
|
||||
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
cu1 = p1.getListing().getCodeUnitAt(addr(0x01003b02));
|
||||
@ -355,7 +355,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
stripConflictDtSuffixes(u2.getPathName()));
|
||||
|
||||
// Try to apply it again. Should get same result.
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
cu1 = p1.getListing().getCodeUnitAt(addr(0x01003b02));
|
||||
@ -392,7 +392,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
struct_a2.add(new DWordDataType());
|
||||
programBuilder2.applyDataType("0x01003ac8", struct_a2, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003ac8), addr(0x01003acc)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003ac8, 0x01003acc);
|
||||
@ -410,7 +410,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x01003b29", new PointerDataType(new ByteDataType()), 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b29), addr(0x01003b2c)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b29, 0x01003b2c);
|
||||
@ -430,7 +430,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x01003b31", new ArrayDataType(new ByteDataType(), 5, 1), 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b31), addr(0x01003b35)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b31, 0x01003b35);
|
||||
@ -444,7 +444,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x1003b3a", new DoubleDataType(), 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b3a), addr(0x01003b41)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b3a, 0x01003b41);
|
||||
@ -468,7 +468,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x01003b45", outer, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
struct_a2.add(new DWordDataType());
|
||||
programBuilder2.applyDataType("0x01003b5e", struct_a2, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b5e), addr(0x01003b62)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b5e, 0x01003b62);
|
||||
@ -508,7 +508,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003ad5), addr(0x01003ad9)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003ad5, 0x01003ad9);
|
||||
@ -533,7 +533,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
union_c2.add(new DWordDataType());
|
||||
programBuilder2.applyDataType("0x01003ae1", union_c2, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003ae1), addr(0x01003ae6)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003ae1, 0x01003ae6);
|
||||
@ -552,7 +552,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x1003aed", struct_a1, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003aec), addr(0x01003af1)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003aec, 0x01003af1);
|
||||
@ -575,7 +575,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003af7), addr(0x01003afb)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003af7, 0x01003afb);
|
||||
@ -597,7 +597,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b02), addr(0x01003b06)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b02, 0x01003b06);
|
||||
@ -613,7 +613,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x1003b0d", new ByteDataType(), 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b0d), addr(0x01003b0e)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b0d, 0x01003b0e);
|
||||
@ -629,7 +629,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x1003b14", new ByteDataType(), 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b14), addr(0x01003b14)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b14, 0x01003b14);
|
||||
@ -645,7 +645,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
programBuilder2.applyDataType("0x1003b1c", new UnicodeDataType(), 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(addr(0x01003b1c), addr(0x01003b1d)),
|
||||
programMerge.getFilteredDifferences());
|
||||
mergeCodeUnitDifference(0x01003b1c, 0x01003b1d);
|
||||
@ -677,7 +677,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createEquate("0x100643d", "Four", 0x4, 2);
|
||||
programBuilder2.createEquate("0x10064ee", "MY_EQUATE", 0x14, 2);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x100643d), addr(0x100643d));
|
||||
as.addRange(addr(0x100644d), addr(0x100644d));
|
||||
@ -688,7 +688,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.CODE_UNITS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -704,14 +704,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x01001000), addr(0x010017ff)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x01001028), addr(0x0100102b));
|
||||
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -726,13 +726,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
p2.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x0100299e), addr(0x01002a90)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x0100299e), addr(0x01002a90)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x0100299e), addr(0x0100299e));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -748,14 +748,14 @@ 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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x010048a3), addr(0x010048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -773,14 +773,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function.addParameter(var, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x1002cf5), addr(0x1002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -801,14 +801,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
localVariables[4].setName("numAvailable", SourceType.USER_DEFINED);
|
||||
p1.endTransaction(transactionID1, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10059a3), addr(0x10059a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -829,14 +829,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function1.removeVariable(localVariables[4]);
|
||||
p1.endTransaction(transactionID1, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10059a3), addr(0x10059a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -865,14 +865,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
localVariables2[0].setDataType(new PointerDataType(), SourceType.DEFAULT);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10059a3), addr(0x10059a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -904,7 +904,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.setName("Function2239", SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x10048a3), addr(0x10048a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
@ -912,7 +912,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programMerge.setMergeFilter(new ProgramMergeFilter(
|
||||
ProgramMergeFilter.FUNCTIONS | ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -928,13 +928,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
p2.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2,
|
||||
new AddressSet(addr(0x10030d2), addr(0x10030d7)), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new AddressSet(addr(0x10030d2), addr(0x10030d7)), TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x10030d2), addr(0x10030d2));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -949,13 +949,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
p1.getFunctionManager().removeFunction(addr(0x10030d2));
|
||||
p1.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x10030d2), addr(0x10030d2));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -972,14 +972,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function.getParameter(0).setName("value", SourceType.USER_DEFINED);
|
||||
p1.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x01002cf5), addr(0x01002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -994,7 +994,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x010032d5), addr(0x010033f5));
|
||||
programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, as, TaskMonitor.DUMMY);
|
||||
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));
|
||||
@ -1002,7 +1002,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1019,14 +1019,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function.removeParameter(0);
|
||||
p1.endTransaction(transactionID, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x01002cf5), addr(0x01002cf5));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1054,14 +1054,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
f2p0.setDataType(DataType.DEFAULT, SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x010059a3), addr(0x010059a3));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1102,7 +1102,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
function2.setReturnType(new CharDataType(), SourceType.USER_DEFINED);
|
||||
p2.endTransaction(transactionID2, true);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(0x010048a3), addr(0x010048a3));
|
||||
diffAs.addRange(addr(0x010059a3), addr(0x010059a3));
|
||||
@ -1110,7 +1110,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.FUNCTIONS, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(diffAs, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(diffAs, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(diffAs, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1135,7 +1135,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet as;
|
||||
AddressSet limitedAddrSet = new AddressSet(addr(0x1002950), addr(0x100299b));
|
||||
programMerge =
|
||||
new ProgramMergeManager(p1, p2, limitedAddrSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(p1, p2, limitedAddrSet, TaskMonitor.DUMMY);
|
||||
|
||||
as = new AddressSet();
|
||||
as.addRange(addr(0x100295d), addr(0x100295d));
|
||||
@ -1146,7 +1146,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
new ProgramMergeFilter(ProgramMergeFilter.SYMBOLS, ProgramMergeFilter.REPLACE));
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(as, diffAs);
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1164,14 +1164,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createMemoryReference("0x1002d0f", "0x1006488", RefType.READ,
|
||||
SourceType.USER_DEFINED, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x1002d0f), addr(0x1002d10));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1189,14 +1189,14 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createMemoryReference("0x1002d03", "0x1006488", RefType.READ,
|
||||
SourceType.USER_DEFINED, -1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));
|
||||
as.add(addr(0x1002d03), addr(0x1002d03));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1211,13 +1211,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createMemoryReference("0x1002d25", "0x1006488", RefType.READ,
|
||||
SourceType.USER_DEFINED, 1);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, null, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x1002d25), addr(0x1002d26));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1239,13 +1239,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createMemoryReference("0x1002cfc", "0x1006488", RefType.READ,
|
||||
SourceType.USER_DEFINED, 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1263,13 +1263,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createMemoryReference("0x1002cfc", "0x1006488", RefType.READ,
|
||||
SourceType.USER_DEFINED, 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1286,13 +1286,13 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
programBuilder2.createMemoryReference("0x1002cfc", "0x1006488", RefType.READ,
|
||||
SourceType.USER_DEFINED, 0);
|
||||
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
AddressSet as = new AddressSet(addr(0x1002cfc), addr(0x1002cfc));
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
new ProgramMergeFilter(ProgramMergeFilter.REFERENCES, ProgramMergeFilter.REPLACE));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
assertEquals(new AddressSet(), programMerge.getFilteredDifferences());
|
||||
}
|
||||
|
||||
@ -1310,7 +1310,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.BYTE_DIFFS | ProgramDiffFilter.CODE_UNIT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -1318,7 +1318,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x01002cf8), addr(0x01002cfb));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet unMergableByteAddresses = new AddressSet();// None that can't merge.
|
||||
assertEquals(unMergableByteAddresses, programMerge.getFilteredDifferences());
|
||||
@ -1339,7 +1339,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, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge = new ProgramMergeManager(p1, p2, TaskMonitor.DUMMY);
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(
|
||||
ProgramDiffFilter.BYTE_DIFFS | ProgramDiffFilter.CODE_UNIT_DIFFS));
|
||||
programMerge.setMergeFilter(
|
||||
@ -1347,7 +1347,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet as = new AddressSet();
|
||||
as.addRange(addr(0x01002cf8), addr(0x01002cfb));
|
||||
assertEquals(as, programMerge.getFilteredDifferences());
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet unMergableByteAddresses = new AddressSet();// None that can't merge.
|
||||
assertEquals(unMergableByteAddresses, programMerge.getFilteredDifferences());
|
||||
@ -1384,7 +1384,7 @@ public class ProgramMerge3Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
AddressSetView diffAs = programMerge.getFilteredDifferences();
|
||||
assertEquals(addrSet, diffAs);
|
||||
programMerge.merge(addrSet, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(addrSet, TaskMonitor.DUMMY);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -159,11 +159,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet expectedDifferences = new AddressSet();
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -229,11 +229,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -280,11 +280,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -331,11 +331,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -408,12 +408,12 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter functionFilter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(functionFilter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(functionFilter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -488,12 +488,12 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
addr(latestProgram, "0100199b"));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter functionFilter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(functionFilter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(functionFilter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -581,11 +581,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -655,11 +655,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -729,11 +729,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -804,12 +804,12 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
|
||||
ProgramDiffFilter functionFilter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(functionFilter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(functionFilter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -906,11 +906,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -1022,11 +1022,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
AddressSet expectedDifferences = new AddressSet();
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -1140,11 +1140,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -1257,11 +1257,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
@ -1374,11 +1374,11 @@ public class ThunkFunctionDiffTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
// Perform the Diff and check the differences.
|
||||
ProgramDiff programDiff = new ProgramDiff(latestProgram, myProgram);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
AddressSetView differences = programDiff.getDifferences(TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, differences);
|
||||
ProgramDiffFilter filter = new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS);
|
||||
AddressSetView functionDifferences =
|
||||
programDiff.getDifferences(filter, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programDiff.getDifferences(filter, TaskMonitor.DUMMY);
|
||||
assertEquals(expectedDifferences, functionDifferences);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -155,7 +155,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs = new AddressSet();
|
||||
programMerge.setDiffFilter(new ProgramDiffFilter(ProgramDiffFilter.FUNCTION_DIFFS));
|
||||
@ -234,7 +234,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs =
|
||||
new AddressSet(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
@ -295,7 +295,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
@ -354,7 +354,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
@ -443,7 +443,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
@ -536,7 +536,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(latestProgram, "01001984"), addr(latestProgram, "01001984"));
|
||||
@ -631,7 +631,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
|
||||
AddressSetView as = latestProgram.getMemory();
|
||||
ProgramMergeManager programMerge =
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
new ProgramMergeManager(latestProgram, myProgram, as, TaskMonitor.DUMMY);
|
||||
|
||||
AddressSet diffAs = new AddressSet();
|
||||
diffAs.addRange(addr(latestProgram, THUNK_A_ENTRY), addr(latestProgram, THUNK_A_ENTRY));
|
||||
@ -667,7 +667,7 @@ public class ThunkFunctionMergeTest extends AbstractGhidraHeadedIntegrationTest
|
||||
boolean success = false;
|
||||
int latestId = latestProgram.startTransaction("Merge To Latest");
|
||||
try {
|
||||
programMerge.merge(as, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
programMerge.merge(as, TaskMonitor.DUMMY);
|
||||
success = true;
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
package ghidra.app.merge.listing;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -32,7 +31,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.listing.Function.FunctionUpdateType;
|
||||
import ghidra.program.model.symbol.RefType;
|
||||
import ghidra.program.model.symbol.SourceType;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
|
||||
@ -111,7 +110,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func1,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("No conflict expected", !vsc.hasOverlapConflict());
|
||||
|
||||
}
|
||||
@ -163,7 +162,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
// Since these are params all params should be lumped together
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Parameter conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -202,7 +201,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Parameter conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -242,7 +241,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
bxReg.getParentRegister(), program), SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Local conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -286,7 +285,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
bxReg.getParentRegister(), program), SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Local conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -335,7 +334,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Local conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -374,7 +373,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Local conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -419,7 +418,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Local conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
@ -464,7 +463,7 @@ public class VariableStorageConflictsTest extends AbstractGenericTest {
|
||||
SourceType.DEFAULT);
|
||||
|
||||
FunctionVariableStorageConflicts vsc = new FunctionVariableStorageConflicts(func1, func2,
|
||||
false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
false, TaskMonitor.DUMMY);
|
||||
assertTrue("Local conflict expected", vsc.hasOverlapConflict());
|
||||
|
||||
List<Pair<List<Variable>, List<Variable>>> overlappingVariables =
|
||||
|
@ -20,7 +20,7 @@ import ghidra.program.model.data.DataType;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* A special test 'program-like' class that allows clients to *easily* make changes one
|
||||
@ -113,7 +113,7 @@ public class MergeProgram {
|
||||
|
||||
try {
|
||||
memory.createInitializedBlock(name, startAddress, size, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException("Exception building memory", e);
|
||||
|
@ -27,7 +27,7 @@ import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.mem.Memory;
|
||||
import ghidra.program.model.mem.MemoryBlock;
|
||||
import ghidra.program.model.symbol.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class ProgramOverlaysTest extends AbstractGenericTest {
|
||||
|
||||
@ -119,7 +119,7 @@ public class ProgramOverlaysTest extends AbstractGenericTest {
|
||||
assertNotNull(block);
|
||||
|
||||
int id = p.startTransaction("");
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
p.endTransaction(id, true);
|
||||
|
||||
assertEquals(2, p.getAddressFactory().getNumAddressSpaces()); // ram, OTHER
|
||||
|
@ -194,7 +194,7 @@ public class CodeManager64Test extends AbstractGenericTest {
|
||||
// }
|
||||
// }
|
||||
// fis3.close();
|
||||
// TaskMonitor m = TaskMonitorAdapter.DUMMY_MONITOR;
|
||||
// TaskMonitor m = TaskMonitor.DUMMY;
|
||||
// mem.createInitializedBlock("B1", addr(1000), new ByteArrayInputStream(bytesOne),
|
||||
// bytesOne.length, m, false);
|
||||
// mem.createInitializedBlock("B2", addr(10000), new ByteArrayInputStream(bytesTwo),
|
||||
|
@ -674,7 +674,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
@Test
|
||||
public void testGetDataContaining() throws Exception {
|
||||
mem.createInitializedBlock("test", addr(0x0), 100, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
StringDataType s = new StringDataType();
|
||||
listing.createData(addr(0x0), s, 10);
|
||||
@ -717,7 +717,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
@Test
|
||||
public void testGetDataBefore() throws Exception {
|
||||
mem.createInitializedBlock("test", addr(0x0), 200, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
StringDataType s = new StringDataType();
|
||||
listing.createData(addr(0x0), s, 10);
|
||||
@ -739,7 +739,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
@Test
|
||||
public void testGetDataBefore2() throws Exception {
|
||||
mem.createInitializedBlock("test", addr(0x0), 200, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
|
||||
StringDataType s = new StringDataType();
|
||||
listing.createData(addr(0x0), s, 0x10);
|
||||
@ -826,31 +826,31 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
@Test
|
||||
public void testGetUndefinedDataAfter() throws Exception {
|
||||
mem.createInitializedBlock("bk1", addr(0x0), 0x200, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
parseStatic(addr(0x1100), addr(0x1500));
|
||||
Instruction inst = listing.getInstructionContaining(addr(0x1500));
|
||||
|
||||
Data data = listing.getUndefinedDataAfter(addr(0x100), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
Data data = listing.getUndefinedDataAfter(addr(0x100), TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(addr(0x101), data.getMinAddress());
|
||||
|
||||
data = listing.getUndefinedDataAfter(addr(0x1499), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
data = listing.getUndefinedDataAfter(addr(0x1499), TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
Address expectedAddr = inst.getMaxAddress().addNoWrap(1);
|
||||
assertEquals(expectedAddr, data.getMinAddress());
|
||||
|
||||
data = listing.getUndefinedDataAfter(expectedAddr, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
data = listing.getUndefinedDataAfter(expectedAddr, TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(expectedAddr.addNoWrap(1), data.getMinAddress());
|
||||
|
||||
parseStatic(addr(0x1700), addr(0x1705));
|
||||
inst = listing.getInstructionContaining(addr(0x1705));
|
||||
data = listing.getUndefinedDataAfter(addr(0x16ff), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
data = listing.getUndefinedDataAfter(addr(0x16ff), TaskMonitor.DUMMY);
|
||||
expectedAddr = inst.getMaxAddress().next();
|
||||
assertEquals(expectedAddr, data.getMinAddress());
|
||||
|
||||
listing.clearCodeUnits(addr(0x1390), addr(0x1400), false);
|
||||
data = listing.getUndefinedDataAfter(addr(0x1300), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
data = listing.getUndefinedDataAfter(addr(0x1300), TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(addr(0x1390), data.getMinAddress());
|
||||
}
|
||||
@ -858,37 +858,37 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
@Test
|
||||
public void testGetFirstUndefinedData() throws Exception {
|
||||
mem.createInitializedBlock("bk1", addr(0x0), 0x200, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
parseStatic(addr(0x1100), addr(0x1500));
|
||||
Instruction inst = listing.getInstructionContaining(addr(0x1500));
|
||||
|
||||
Data data = listing.getFirstUndefinedData(new AddressSet(addr(0x101), addr(0x500)),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(addr(0x101), data.getMinAddress());
|
||||
|
||||
data = listing.getFirstUndefinedData(new AddressSet(addr(0x1500), addr(0x2000)),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
Address expectedAddr = inst.getMaxAddress().addNoWrap(1);
|
||||
assertEquals(expectedAddr, data.getMinAddress());
|
||||
|
||||
data = listing.getFirstUndefinedData(
|
||||
new AddressSet(expectedAddr.add(1), expectedAddr.add(500)),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(expectedAddr.addNoWrap(1), data.getMinAddress());
|
||||
|
||||
parseStatic(addr(0x1700), addr(0x1705));
|
||||
inst = listing.getInstructionContaining(addr(0x1705));
|
||||
data = listing.getFirstUndefinedData(new AddressSet(addr(0x1700), addr(0x5000)),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
expectedAddr = inst.getMaxAddress().addNoWrap(1);
|
||||
assertEquals(expectedAddr, data.getMinAddress());
|
||||
|
||||
listing.clearCodeUnits(addr(0x1390), addr(0x1400), false);
|
||||
data = listing.getFirstUndefinedData(new AddressSet(addr(0x1300), addr(0x5000)),
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(addr(0x1390), data.getMinAddress());
|
||||
}
|
||||
@ -897,12 +897,12 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
public void testGetUndefinedDataBefore() throws Exception {
|
||||
parseStatic(addr(0x1100), addr(0x1500));
|
||||
|
||||
Data data = listing.getUndefinedDataBefore(addr(0x1400), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
Data data = listing.getUndefinedDataBefore(addr(0x1400), TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(addr(0x10ff), data.getMinAddress());
|
||||
|
||||
listing.clearCodeUnits(addr(0x1495), addr(0x1500), false);
|
||||
data = listing.getUndefinedDataBefore(addr(0x1600), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
data = listing.getUndefinedDataBefore(addr(0x1600), TaskMonitor.DUMMY);
|
||||
assertNotNull(data);
|
||||
assertEquals(addr(0x15ff), data.getMinAddress());
|
||||
}
|
||||
@ -910,7 +910,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
@Test
|
||||
public void testClearProperties() throws Exception {
|
||||
mem.createInitializedBlock("bk1", addr(0x0), 0x200, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
// addresses 10-19
|
||||
for (int i = 0; i < 20; i++) {
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(i + 10));
|
||||
@ -923,7 +923,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
cu.setProperty("Name", "codeUnit_" + i);
|
||||
assertNotNull(cu.getStringProperty("Name"));
|
||||
}
|
||||
listing.clearProperties(addr(0x0), addr(0x15), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
listing.clearProperties(addr(0x0), addr(0x15), TaskMonitor.DUMMY);
|
||||
CodeUnit cu = listing.getCodeUnitAt(addr(0x10));
|
||||
try {
|
||||
cu.getIntProperty("Numbers");
|
||||
@ -936,7 +936,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
cu = listing.getCodeUnitAt(addr(0x18));
|
||||
cu.getIntProperty("Numbers");
|
||||
|
||||
listing.clearProperties(addr(0x16), addr(0x200), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
listing.clearProperties(addr(0x16), addr(0x200), TaskMonitor.DUMMY);
|
||||
cu = listing.getCodeUnitAt(addr(0x16));
|
||||
try {
|
||||
cu.getIntProperty("Numbers");
|
||||
@ -957,7 +957,7 @@ public class CodeManagerTest extends AbstractGenericTest {
|
||||
parseStatic(addr(0x1500), addr(0x1600));
|
||||
|
||||
assertNotNull(listing.getInstructionAt(addr(0x1500)));
|
||||
listing.clearAll(false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
listing.clearAll(false, TaskMonitor.DUMMY);
|
||||
|
||||
assertNull(listing.getInstructionAt(addr(0x1500)));
|
||||
assertEquals(0, listing.getNumInstructions());
|
||||
|
@ -22,7 +22,7 @@ import java.util.*;
|
||||
import org.junit.*;
|
||||
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class ByteTrieTest {
|
||||
|
||||
@ -201,7 +201,7 @@ public class ByteTrieTest {
|
||||
add(trie, "caa", true);
|
||||
|
||||
List<SearchResult<Integer, String>> result =
|
||||
trie.search("abccab".getBytes(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
trie.search("abccab".getBytes(), TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals("wrong size result list", 7, result.size());
|
||||
expect(result, 0, "a");
|
||||
@ -221,7 +221,7 @@ public class ByteTrieTest {
|
||||
add(trie, "hers", true);
|
||||
|
||||
List<SearchResult<Integer, String>> result =
|
||||
trie.search("they shelled this hershey".getBytes(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
trie.search("they shelled this hershey".getBytes(), TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals("wrong size result list", 8, result.size());
|
||||
expect(result, 1, "he");
|
||||
@ -245,7 +245,7 @@ public class ByteTrieTest {
|
||||
add(trie, "tables", true);
|
||||
|
||||
List<SearchResult<Integer, String>> result =
|
||||
trie.search("unstoppable tables".getBytes(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
trie.search("unstoppable tables".getBytes(), TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals("wrong size result list", 8, result.size());
|
||||
expect(result, 0, "unstoppable");
|
||||
@ -288,7 +288,7 @@ public class ByteTrieTest {
|
||||
*/
|
||||
private static Iterator<String> iterator(ByteTrieIfc<String> trie) throws CancelledException {
|
||||
final ArrayList<String> list = new ArrayList<String>();
|
||||
trie.inorder(TaskMonitorAdapter.DUMMY_MONITOR, new Op<String>() {
|
||||
trie.inorder(TaskMonitor.DUMMY, new Op<String>() {
|
||||
@Override
|
||||
public void op(ByteTrieNodeIfc<String> node) {
|
||||
if (node.isTerminal()) {
|
||||
@ -307,7 +307,7 @@ public class ByteTrieTest {
|
||||
*/
|
||||
private static Iterator<String> iterator2(ByteTrieIfc<String> trie) throws CancelledException {
|
||||
final ArrayList<String> list = new ArrayList<String>();
|
||||
trie.inorder(TaskMonitorAdapter.DUMMY_MONITOR, new Op<String>() {
|
||||
trie.inorder(TaskMonitor.DUMMY, new Op<String>() {
|
||||
@Override
|
||||
public void op(ByteTrieNodeIfc<String> node) {
|
||||
if (node.isTerminal()) {
|
||||
|
@ -22,7 +22,7 @@ import java.util.*;
|
||||
import org.junit.*;
|
||||
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class CaseInsensitiveByteTrieTest {
|
||||
|
||||
@ -217,7 +217,7 @@ public class CaseInsensitiveByteTrieTest {
|
||||
add(trie, "cAa", true);
|
||||
|
||||
List<SearchResult<Integer, String>> result =
|
||||
trie.search("abccab".getBytes(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
trie.search("abccab".getBytes(), TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals("wrong size result list", 7, result.size());
|
||||
expect(result, 0, "a");
|
||||
@ -237,7 +237,7 @@ public class CaseInsensitiveByteTrieTest {
|
||||
add(trie, "Hers", true);
|
||||
|
||||
List<SearchResult<Integer, String>> result =
|
||||
trie.search("they shelled this hershey".getBytes(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
trie.search("they shelled this hershey".getBytes(), TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals("wrong size result list", 8, result.size());
|
||||
expect(result, 1, "hE");
|
||||
@ -261,7 +261,7 @@ public class CaseInsensitiveByteTrieTest {
|
||||
add(trie, "tAblEs", true);
|
||||
|
||||
List<SearchResult<Integer, String>> result =
|
||||
trie.search("unstoppable tables".getBytes(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
trie.search("unstoppable tables".getBytes(), TaskMonitor.DUMMY);
|
||||
|
||||
assertEquals("wrong size result list", 8, result.size());
|
||||
expect(result, 0, "unStoppable");
|
||||
@ -304,7 +304,7 @@ public class CaseInsensitiveByteTrieTest {
|
||||
*/
|
||||
private static Iterator<String> iterator(ByteTrieIfc<String> trie) throws CancelledException {
|
||||
final ArrayList<String> list = new ArrayList<String>();
|
||||
trie.inorder(TaskMonitorAdapter.DUMMY_MONITOR, new Op<String>() {
|
||||
trie.inorder(TaskMonitor.DUMMY, new Op<String>() {
|
||||
@Override
|
||||
public void op(ByteTrieNodeIfc<String> node) {
|
||||
if (node.isTerminal()) {
|
||||
@ -323,7 +323,7 @@ public class CaseInsensitiveByteTrieTest {
|
||||
*/
|
||||
private static Iterator<String> iterator2(ByteTrieIfc<String> trie) throws CancelledException {
|
||||
final ArrayList<String> list = new ArrayList<String>();
|
||||
trie.inorder(TaskMonitorAdapter.DUMMY_MONITOR, new Op<String>() {
|
||||
trie.inorder(TaskMonitor.DUMMY, new Op<String>() {
|
||||
@Override
|
||||
public void op(ByteTrieNodeIfc<String> node) {
|
||||
if (node.isTerminal()) {
|
||||
|
@ -27,7 +27,7 @@ import ghidra.program.model.lang.Register;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.mem.MemoryAccessException;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import ghidra.util.xml.SpecXmlUtils;
|
||||
import ghidra.xml.XmlElement;
|
||||
import ghidra.xml.XmlPullParser;
|
||||
@ -124,7 +124,7 @@ public class FuncRecord implements Comparable<FuncRecord> {
|
||||
}
|
||||
|
||||
digest.reset();
|
||||
digest.update(totalToHash, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
digest.update(totalToHash, TaskMonitor.DUMMY);
|
||||
|
||||
//Finally, update the hash signature.
|
||||
this.hashValue = digest.digestLong();
|
||||
|
@ -54,7 +54,7 @@ import ghidra.program.model.mem.MemoryBlock;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Test editing in the Byte Viewer.
|
||||
@ -854,7 +854,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
MemoryBlock block = memory.getBlock(addr);
|
||||
Address newStart = getAddr(0x500);
|
||||
transactionID = program.startTransaction("Test");
|
||||
memory.moveBlock(block, newStart, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.moveBlock(block, newStart, TaskMonitor.DUMMY);
|
||||
program.endTransaction(transactionID, true);
|
||||
program.flushEvents();
|
||||
|
||||
@ -966,7 +966,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
assertEquals(getFieldLocation(addr), loc);
|
||||
|
||||
int transactionID = program.startTransaction("Test");
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
program.endTransaction(transactionID, true);
|
||||
program.flushEvents();
|
||||
|
||||
@ -997,7 +997,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
MemoryBlock block = memory.getBlock(getAddr(0x01001000));
|
||||
int transactionID = program.startTransaction("Test");
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
program.endTransaction(transactionID, true);
|
||||
program.flushEvents();
|
||||
|
||||
@ -1061,7 +1061,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
MemoryBlock block = null;
|
||||
try {
|
||||
block = memory.createInitializedBlock(".test", getAddr(0), 500, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, false);
|
||||
TaskMonitor.DUMMY, false);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(transactionID, true);
|
||||
@ -1087,7 +1087,7 @@ public class ByteViewerPlugin2Test extends AbstractGhidraHeadedIntegrationTest {
|
||||
// now remove the block
|
||||
transactionID = program.startTransaction("test");
|
||||
try {
|
||||
memory.removeBlock(block, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
memory.removeBlock(block, TaskMonitor.DUMMY);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(transactionID, true);
|
||||
|
@ -39,7 +39,7 @@ import ghidra.framework.store.db.PackedDatabase;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.filechooser.ExtensionFileFilter;
|
||||
import ghidra.util.layout.PairLayout;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
import utility.application.ApplicationLayout;
|
||||
|
||||
/**
|
||||
@ -134,8 +134,8 @@ public class DbViewer extends JFrame {
|
||||
catch (IOException e) {
|
||||
try {
|
||||
PackedDatabase pdb = PackedDatabase.getPackedDatabase(selectedFile,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
dbh = pdb.open(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
dbh = pdb.open(TaskMonitor.DUMMY);
|
||||
tables = dbh.getTables();
|
||||
Arrays.sort(tables, new TableNameComparator());
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class FunctionGraphPlugin1Test extends AbstractFunctionGraphTest {
|
||||
// long startTime = System.nanoTime();
|
||||
// BasicBlockModel blockModel = new BasicBlockModel(cppProgram, false);
|
||||
// CodeBlockIterator iterator =
|
||||
// blockModel.getCodeBlocksContaining(function.getBody(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
// blockModel.getCodeBlocksContaining(function.getBody(), TaskMonitor.DUMMY);
|
||||
// while (iterator.hasNext()) {
|
||||
// iterator.next();
|
||||
// }
|
||||
|
@ -18,16 +18,12 @@
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import db.DBHandle;
|
||||
import db.DBRecord;
|
||||
import db.RecordIterator;
|
||||
import db.Schema;
|
||||
import db.Table;
|
||||
import db.*;
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.framework.store.db.PackedDBHandle;
|
||||
import ghidra.framework.store.db.PackedDatabase;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class RepackFid extends GhidraScript {
|
||||
|
||||
@ -61,8 +57,8 @@ public class RepackFid extends GhidraScript {
|
||||
protected void run() throws Exception {
|
||||
File file = askFile("Select FID database file to repack","OK");
|
||||
PackedDatabase pdb;
|
||||
pdb = PackedDatabase.getPackedDatabase(file, false, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
DBHandle handle = pdb.open(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
pdb = PackedDatabase.getPackedDatabase(file, false, TaskMonitor.DUMMY);
|
||||
DBHandle handle = pdb.open(TaskMonitor.DUMMY);
|
||||
File saveFile = askFile("Select name for copy","OK");
|
||||
PackedDBHandle newHandle = new PackedDBHandle(pdb.getContentType());
|
||||
|
||||
@ -72,7 +68,7 @@ public class RepackFid extends GhidraScript {
|
||||
copyTable(tables[i],newHandle);
|
||||
newHandle.endTransaction(transactionID, true);
|
||||
}
|
||||
newHandle.saveAs(pdb.getContentType(), saveFile.getParentFile(),saveFile.getName(), TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
newHandle.saveAs(pdb.getContentType(), saveFile.getParentFile(),saveFile.getName(), TaskMonitor.DUMMY);
|
||||
newHandle.close();
|
||||
}
|
||||
}
|
||||
|
@ -132,11 +132,11 @@ public class FidDB implements Closeable {
|
||||
private DBHandle openPackedDatabase() throws IOException {
|
||||
try {
|
||||
PackedDatabase pdb = PackedDatabase.getPackedDatabase(fidFile.getFile(), false,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
if (openForUpdate) {
|
||||
return pdb.openForUpdate(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return pdb.openForUpdate(TaskMonitor.DUMMY);
|
||||
}
|
||||
return pdb.open(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return pdb.open(TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// using dummy monitor - can't happen
|
||||
|
@ -28,7 +28,7 @@ import ghidra.program.model.mem.Memory;
|
||||
import ghidra.program.model.mem.MemoryBlock;
|
||||
import ghidra.program.util.DiffUtility;
|
||||
import ghidra.test.ClassicSampleX86ProgramBuilder;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class DiffOverlayApplyTest extends DiffApplyTestAdapter {
|
||||
|
||||
@ -50,7 +50,7 @@ public class DiffOverlayApplyTest extends DiffApplyTestAdapter {
|
||||
MemoryBlock dataBlock1 = memory1.getBlock(".data");
|
||||
MemoryBlock overlayBlock1 =
|
||||
memory1.createInitializedBlock("OVL1", dataBlock1.getStart(), 0x20L, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, true);
|
||||
TaskMonitor.DUMMY, true);
|
||||
assertEquals(3, p1.getAddressFactory().getNumAddressSpaces()); // ram, OTHER, OVL1
|
||||
|
||||
AddressSet addressSet1 = new AddressSet(overlayBlock1.getStart(), overlayBlock1.getEnd());
|
||||
@ -77,7 +77,7 @@ public class DiffOverlayApplyTest extends DiffApplyTestAdapter {
|
||||
MemoryBlock dataBlock2 = memory2.getBlock(".data");
|
||||
MemoryBlock overlayBlock2 =
|
||||
memory2.createInitializedBlock("OVL1", dataBlock2.getStart(), 0x20L, (byte) 0,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR, true);
|
||||
TaskMonitor.DUMMY, true);
|
||||
assertEquals(3, p2.getAddressFactory().getNumAddressSpaces());
|
||||
|
||||
AddressSet addressSet2 = DiffUtility.getCompatibleAddressSet(addressSet1, p2);
|
||||
|
@ -17,6 +17,9 @@ package ghidra.feature.vt.api.impl;
|
||||
|
||||
import static ghidra.feature.vt.api.main.VTMarkupItemDestinationAddressEditStatus.*;
|
||||
import static ghidra.feature.vt.api.main.VTMarkupItemStatus.*;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import ghidra.feature.vt.api.db.VTAssociationDB;
|
||||
import ghidra.feature.vt.api.db.VTSessionDB;
|
||||
import ghidra.feature.vt.api.main.*;
|
||||
@ -29,9 +32,7 @@ import ghidra.program.model.address.Address;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.util.SystemUtilities;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
|
||||
import java.util.Collection;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class MarkupItemImpl implements VTMarkupItem {
|
||||
private VTMarkupType markupType;
|
||||
@ -128,7 +129,7 @@ public class MarkupItemImpl implements VTMarkupItem {
|
||||
gettingStatus = true;
|
||||
boolean conflictsWithOtherMarkup =
|
||||
getMarkupType().conflictsWithOtherMarkup(this,
|
||||
getAssociation().getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR));
|
||||
getAssociation().getMarkupItems(TaskMonitor.DUMMY));
|
||||
if (conflictsWithOtherMarkup) {
|
||||
return CONFLICT;
|
||||
}
|
||||
@ -309,7 +310,7 @@ public class MarkupItemImpl implements VTMarkupItem {
|
||||
VTAssociationStatus associationStatus = association.getStatus();
|
||||
try {
|
||||
Collection<VTMarkupItem> markupItems =
|
||||
association.getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
association.getMarkupItems(TaskMonitor.DUMMY);
|
||||
return associationStatus.canApply() && getStatus().isAppliable() &&
|
||||
!markupType.conflictsWithOtherMarkup(this, markupItems);
|
||||
}
|
||||
@ -352,7 +353,7 @@ public class MarkupItemImpl implements VTMarkupItem {
|
||||
VTAssociation association = markupItemStorage.getAssociation();
|
||||
Collection<VTMarkupItem> markupItems;
|
||||
try {
|
||||
markupItems = association.getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
markupItems = association.getMarkupItems(TaskMonitor.DUMMY);
|
||||
for (VTMarkupItem currentMarkupItem : markupItems) {
|
||||
if (currentMarkupItem == this) {
|
||||
continue;
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* ###
|
||||
* 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.
|
||||
@ -91,7 +90,7 @@ public class MarkupItemManagerImpl {
|
||||
// will be speedy. If this is found to be false, then we need to take a
|
||||
// monitor into this method.
|
||||
Collection<MarkupItemStorageDB> databaseMarkupItems =
|
||||
associationDBM.getAppliedMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR, association);
|
||||
associationDBM.getAppliedMarkupItems(TaskMonitor.DUMMY, association);
|
||||
for (MarkupItemStorageDB appliedItem : databaseMarkupItems) {
|
||||
VTMarkupItemStatus status = appliedItem.getStatus();
|
||||
if (status.isUnappliable()) {
|
||||
|
@ -34,7 +34,7 @@ import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.util.StringUtilities;
|
||||
import ghidra.util.SystemUtilities;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public abstract class CommentMarkupType extends VTMarkupType {
|
||||
|
||||
@ -206,7 +206,7 @@ public abstract class CommentMarkupType extends VTMarkupType {
|
||||
Stringable appliedMarkupOriginalValue = null;
|
||||
try {
|
||||
appliedMarkupOriginalValue = getOriginalDestinationValueForAppliedMarkupOfThisType(
|
||||
association, destinationAddress, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
association, destinationAddress, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// For now this shouldn't get a cancel.
|
||||
|
@ -35,7 +35,7 @@ import ghidra.program.util.LabelFieldLocation;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.util.SystemUtilities;
|
||||
import ghidra.util.exception.*;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class LabelMarkupType extends VTMarkupType {
|
||||
|
||||
@ -346,7 +346,7 @@ public class LabelMarkupType extends VTMarkupType {
|
||||
Stringable appliedMarkupOriginalValue = null;
|
||||
try {
|
||||
appliedMarkupOriginalValue = getOriginalDestinationValueForAppliedMarkupOfThisType(
|
||||
association, destinationAddress, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
association, destinationAddress, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// For now this shouldn't get a cancel.
|
||||
|
@ -15,6 +15,9 @@
|
||||
*/
|
||||
package ghidra.feature.vt.gui.provider.impliedmatches;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import ghidra.feature.vt.api.main.*;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTControllerListener;
|
||||
@ -22,10 +25,7 @@ import ghidra.feature.vt.gui.util.MatchInfo;
|
||||
import ghidra.framework.model.DomainObjectChangedEvent;
|
||||
import ghidra.framework.options.Options;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class MatchStatusUpdaterAssociationHook implements AssociationHook, VTControllerListener {
|
||||
|
||||
@ -82,12 +82,12 @@ public class MatchStatusUpdaterAssociationHook implements AssociationHook, VTCon
|
||||
|
||||
// MatchInfo matchInfo = controller.getMatchInfo(matches.get(0));
|
||||
// Collection<VTMarkupItem> markupItems =
|
||||
// matchInfo.getAppliableMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
// matchInfo.getAppliableMarkupItems(TaskMonitor.DUMMY);
|
||||
|
||||
Collection<VTMarkupItem> markupItems;
|
||||
try {
|
||||
markupItems =
|
||||
matches.get(0).getAssociation().getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
matches.get(0).getAssociation().getMarkupItems(TaskMonitor.DUMMY);
|
||||
VTAssociationMarkupStatus markupItemsStatus = getAppliedMarkupStatus(markupItems);
|
||||
association.setMarkupStatus(markupItemsStatus);
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ public class MatchInfo {
|
||||
try {
|
||||
correlatedDestinationRange =
|
||||
addressTranslator.getCorrelatedDestinationRange(sourceAddress,
|
||||
TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// check for null below
|
||||
|
@ -105,7 +105,7 @@ public class VTMatchApplyFunctionSignatureTest extends AbstractGhidraHeadedInteg
|
||||
// try {
|
||||
// correlator =
|
||||
// vtTestEnv.correlate(new ExactMatchInstructionsProgramCorrelatorFactory(), null,
|
||||
// TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
// TaskMonitor.DUMMY);
|
||||
// }
|
||||
// catch (Exception e) {
|
||||
// Assert.fail(e.getMessage());
|
||||
@ -1637,7 +1637,7 @@ public class VTMatchApplyFunctionSignatureTest extends AbstractGhidraHeadedInteg
|
||||
private VTMarkupItem getFunctionSignatureMarkup(VTMatch match) {
|
||||
MatchInfo matchInfo = controller.getMatchInfo(match);
|
||||
Collection<VTMarkupItem> appliableMarkupItems =
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitor.DUMMY);
|
||||
for (VTMarkupItem vtMarkupItem : appliableMarkupItems) {
|
||||
if (vtMarkupItem.getMarkupType() instanceof FunctionSignatureMarkupType) {
|
||||
return vtMarkupItem;
|
||||
@ -1744,7 +1744,7 @@ public class VTMatchApplyFunctionSignatureTest extends AbstractGhidraHeadedInteg
|
||||
}
|
||||
}
|
||||
assertNotNull(compilerSpecID);
|
||||
program.setLanguage(language, compilerSpecID, true, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
program.setLanguage(language, compilerSpecID, true, TaskMonitor.DUMMY);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(transaction, true);
|
||||
|
@ -433,7 +433,7 @@ public class VTMatchApplyTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
// Now test the unapply
|
||||
//
|
||||
ClearMatchTask unapplyTask = new ClearMatchTask(controller, matches);
|
||||
unapplyTask.run(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
unapplyTask.run(TaskMonitor.DUMMY);
|
||||
newSymbols = symbolTable.getSymbols(labelAddress);
|
||||
expectedSymbols = new Symbol[] { destinationSymbol1 };
|
||||
assertTrue("New label does not match the source label",
|
||||
@ -1064,7 +1064,7 @@ public class VTMatchApplyTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
MatchInfo matchInfo = controller.getMatchInfo(match);
|
||||
Collection<VTMarkupItem> markupItems =
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitor.DUMMY);
|
||||
|
||||
List<VTMarkupItem> itemsToApply = new ArrayList<>();
|
||||
for (VTMarkupItem item : markupItems) {
|
||||
|
@ -32,7 +32,7 @@ import ghidra.framework.options.ToolOptions;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.SourceType;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class ForceApplyOfExcludedMarkupTest extends AbstractFunctionSignatureMarkupTest {
|
||||
|
||||
@ -274,7 +274,7 @@ public class ForceApplyOfExcludedMarkupTest extends AbstractFunctionSignatureMar
|
||||
protected VTMarkupItem getFunctionNameMarkup(VTMatch match) {
|
||||
MatchInfo matchInfo = controller.getMatchInfo(match);
|
||||
Collection<VTMarkupItem> appliableMarkupItems =
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitor.DUMMY);
|
||||
for (VTMarkupItem vtMarkupItem : appliableMarkupItems) {
|
||||
if (vtMarkupItem.getMarkupType() instanceof FunctionNameMarkupType) {
|
||||
return vtMarkupItem;
|
||||
@ -296,7 +296,7 @@ public class ForceApplyOfExcludedMarkupTest extends AbstractFunctionSignatureMar
|
||||
protected VTMarkupItem getCommentMarkup(VTMatch match, int commentType) {
|
||||
MatchInfo matchInfo = controller.getMatchInfo(match);
|
||||
Collection<VTMarkupItem> appliableMarkupItems =
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
matchInfo.getAppliableMarkupItems(TaskMonitor.DUMMY);
|
||||
for (VTMarkupItem vtMarkupItem : appliableMarkupItems) {
|
||||
switch (commentType) {
|
||||
case CodeUnit.PLATE_COMMENT:
|
||||
|
@ -22,7 +22,8 @@ import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import ghidra.feature.vt.api.main.*;
|
||||
import ghidra.feature.vt.api.main.VTMarkupItem;
|
||||
import ghidra.feature.vt.api.main.VTMarkupItemStatus;
|
||||
import ghidra.feature.vt.api.markuptype.FunctionSignatureMarkupType;
|
||||
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.*;
|
||||
import ghidra.framework.options.ToolOptions;
|
||||
@ -32,7 +33,7 @@ import ghidra.program.model.lang.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.model.symbol.SourceType;
|
||||
import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class FunctionSignatureMarkupOptionsTest extends AbstractFunctionSignatureMarkupTest {
|
||||
|
||||
@ -795,7 +796,7 @@ private void setLanguage(Program program, String languageID, String compilerSpec
|
||||
}
|
||||
}
|
||||
assertNotNull(compilerSpecID);
|
||||
program.setLanguage(language, compilerSpecID, true, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
program.setLanguage(language, compilerSpecID, true, TaskMonitor.DUMMY);
|
||||
}
|
||||
finally {
|
||||
program.endTransaction(transaction, true);
|
||||
|
@ -16,8 +16,7 @@
|
||||
*/
|
||||
package ghidra.feature.vt.gui.provider;
|
||||
|
||||
import static ghidra.feature.vt.db.VTTestUtils.createProgramCorrelator;
|
||||
import static ghidra.feature.vt.db.VTTestUtils.createRandomMatch;
|
||||
import static ghidra.feature.vt.db.VTTestUtils.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.awt.Component;
|
||||
@ -56,7 +55,7 @@ import ghidra.util.HTMLUtilities;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.table.GhidraTable;
|
||||
import ghidra.util.task.Task;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* An abstract class for Correlator Tests.
|
||||
@ -382,7 +381,7 @@ public abstract class AbstractVTCorrelatorTest extends AbstractGhidraHeadedInteg
|
||||
*/
|
||||
protected void runTask(Task task) throws Exception {
|
||||
|
||||
task.run(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
task.run(TaskMonitor.DUMMY);
|
||||
destProg.flushEvents();
|
||||
waitForSwing();
|
||||
waitForTasks();
|
||||
|
@ -31,7 +31,7 @@ import ghidra.program.model.listing.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public abstract class AbstractCorrelatorTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
||||
@ -100,7 +100,7 @@ public abstract class AbstractCorrelatorTest extends AbstractGhidraHeadedIntegra
|
||||
options = factory.createDefaultOptions();
|
||||
correlator = factory.createCorrelator(serviceProvider, sourceProgram,
|
||||
sourceAddressSet, destinationProgram, destinationAddressSet, options);
|
||||
correlator.correlate(session, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
correlator.correlate(session, TaskMonitor.DUMMY);
|
||||
|
||||
FunctionManager functionManager = sourceProgram.getFunctionManager();
|
||||
FunctionIterator functions =
|
||||
@ -167,7 +167,7 @@ public abstract class AbstractCorrelatorTest extends AbstractGhidraHeadedIntegra
|
||||
options = factory.createDefaultOptions();
|
||||
correlator = factory.createCorrelator(serviceProvider, sourceProgram,
|
||||
sourceAddressSet, destinationProgram, destinationAddressSet, options);
|
||||
correlator.correlate(session, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
correlator.correlate(session, TaskMonitor.DUMMY);
|
||||
|
||||
HashMap<Address, Address> mapCopy = new HashMap<>(map);
|
||||
|
||||
|
@ -367,7 +367,7 @@ public abstract class AbstractVTMarkupItemTest extends AbstractGhidraHeadedInteg
|
||||
// Association markupItemManger expects all markups to be generated though it.
|
||||
// Call it to put it in a good state.
|
||||
VTAssociation association = addedMatch.getAssociation();
|
||||
association.getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
association.getMarkupItems(TaskMonitor.DUMMY);
|
||||
|
||||
return addedMatch;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ import ghidra.feature.vt.api.main.*;
|
||||
import ghidra.feature.vt.api.markupitem.MarkupTypeTestStub;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitorAdapter;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class UnappliedMarkupItemStorageDBTest extends VTBaseTestCase {
|
||||
|
||||
@ -236,7 +236,7 @@ public class UnappliedMarkupItemStorageDBTest extends VTBaseTestCase {
|
||||
|
||||
VTAssociationDB association = (VTAssociationDB) match.getAssociation();
|
||||
Collection<VTMarkupItem> markupItems =
|
||||
association.getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
association.getMarkupItems(TaskMonitor.DUMMY);
|
||||
assertEquals(1, markupItems.size());
|
||||
VTMarkupItem foundItem = markupItems.iterator().next();
|
||||
Object storage = getInstanceField("markupItemStorage", foundItem);
|
||||
@ -257,7 +257,7 @@ public class UnappliedMarkupItemStorageDBTest extends VTBaseTestCase {
|
||||
VTMarkupItem markupItem = createRandomMarkupItemStub(match);
|
||||
VTAssociationDB association = (VTAssociationDB) match.getAssociation();
|
||||
Collection<VTMarkupItem> markupItems =
|
||||
association.getMarkupItems(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
association.getMarkupItems(TaskMonitor.DUMMY);
|
||||
assertEquals(1, markupItems.size());
|
||||
VTMarkupItem foundItem = markupItems.iterator().next();
|
||||
Object storage = getInstanceField("markupItemStorage", foundItem);
|
||||
|
@ -71,7 +71,7 @@ public class VTSessionDBTest extends VTBaseTestCase {
|
||||
//
|
||||
// GhidraProject project = GhidraProject.createProject( "C:\\Temp\\", "GhidrProject", true );
|
||||
// DomainFolder rootFolder = project.getRootFolder();
|
||||
// DomainFile file = rootFolder.createFile( "foop", db, TaskMonitorAdapter.DUMMY_MONITOR );
|
||||
// DomainFile file = rootFolder.createFile( "foop", db, TaskMonitor.DUMMY );
|
||||
//
|
||||
// Program sourceProgram = db.getSourceProgram();
|
||||
// Program destinationProgram = db.getDestinationProgram();
|
||||
@ -79,7 +79,7 @@ public class VTSessionDBTest extends VTBaseTestCase {
|
||||
// db.close();
|
||||
//
|
||||
// DomainObject domainObject = file.getDomainObject( null, false, false,
|
||||
// TaskMonitorAdapter.DUMMY_MONITOR );
|
||||
// TaskMonitor.DUMMY );
|
||||
// assertTrue( domainObject instanceof VTSessionDB );
|
||||
// assertEquals( "foop", domainObject.getName() );
|
||||
//
|
||||
|
@ -607,7 +607,7 @@ public class LocalManagedBufferFile extends LocalBufferFile implements ManagedBu
|
||||
@Override
|
||||
public synchronized ManagedBufferFile getSaveFile() throws IOException {
|
||||
try {
|
||||
return getSaveFile(TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
return getSaveFile(TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// unexpected
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user