GP-1633/GP-2308 Added ProgramArchitecture to datatype managers.

Refactored ProjectDataTypeManager to extend StandaloneDataTypeManager.
Added actions to datatype tree to allow setting archive architecture.
Added use of storage translators when switching architectures.  Allow
FunctionDefinition to accept arbitrary calling convention
names and many other misc changes.
This commit is contained in:
ghidra1
2021-12-27 17:01:32 -05:00
parent 75a185aa9e
commit a4776892bd
248 changed files with 6282 additions and 2935 deletions

View File

@@ -26,6 +26,7 @@ import java.util.Iterator;
import ghidra.app.script.GhidraScript;
import ghidra.program.model.data.*;
import ghidra.program.model.data.StandAloneDataTypeManager.ArchiveWarning;
import ghidra.util.UniversalID;
public class CompareGDTs extends GhidraScript {
@@ -54,13 +55,28 @@ public class CompareGDTs extends GhidraScript {
return;
}
}
firstArchive = openDataTypeArchive(firstFile, false);
if (firstArchive.getWarning() != ArchiveWarning.NONE) {
popup(
"An architecture language error occured while opening archive (see log for details)\n" +
firstFile.getPath());
return;
}
secondArchive = openDataTypeArchive(secondFile, false);
if (secondArchive.getWarning() != ArchiveWarning.NONE) {
popup(
"An architecture language error occured while opening archive (see log for details)\n" +
secondFile.getPath());
return;
}
matchByName = askYesNo("Match Data Types By Path Name?",
"Do you want to match data types by their path names (rather than by Universal ID)?");
checkPointers = askYesNo("Check Pointers?", "Do you want to check Pointers?");
checkArrays = askYesNo("Check Arrays?", "Do you want to check Arrays?");
firstArchive = FileDataTypeManager.openFileArchive(firstFile, false);
secondArchive = FileDataTypeManager.openFileArchive(secondFile, false);
printWriter = new PrintWriter(outputFile);
try {
compareDataTypes();