mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-26 05:37:32 +08:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+8
-8
@@ -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;
|
||||
|
||||
+1
-1
@@ -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...");
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -490,7 +490,7 @@ public class GhidraProject {
|
||||
throw new DuplicateFileException("File already exists: " + file);
|
||||
}
|
||||
}
|
||||
program.saveToPackedFile(file, TaskMonitorAdapter.DUMMY_MONITOR);
|
||||
program.saveToPackedFile(file, TaskMonitorAdapter.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
|
||||
|
||||
+11
-11
@@ -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) {
|
||||
|
||||
+22
-22
@@ -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) {
|
||||
|
||||
+21
-21
@@ -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;
|
||||
}
|
||||
|
||||
+13
-14
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+4
-4
@@ -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 {
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+39
-39
@@ -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);
|
||||
|
||||
+25
-25
@@ -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);
|
||||
|
||||
+9
-9
@@ -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);
|
||||
|
||||
+3
-4
@@ -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 {
|
||||
|
||||
+4
-4
@@ -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;
|
||||
|
||||
+3
-4
@@ -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);
|
||||
|
||||
+3
-3
@@ -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() {
|
||||
|
||||
+20
-19
@@ -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));
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+15
-15
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
+3
-3
@@ -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);
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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();
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
+7
-7
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+4
-4
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user