mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-19 16:40:38 -09:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user