mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 16:56:16 +08:00
GP-3697 Added delayed ProjectFileManager disposal in support of URL use
and opening linked project files and renamed ProjectFileData to DefaultProjectData.
This commit is contained in:
@@ -75,7 +75,16 @@ public class AskScript extends GhidraScript {
|
||||
}
|
||||
|
||||
Program prog = askProgram("Please choose a program to open.");
|
||||
println("Program picked: " + prog.getName());
|
||||
if (prog != null) {
|
||||
// NOTE: if prog is not null script must release it when done using.
|
||||
// This may also be accomplished via an overridden cleanup(boolean) method.
|
||||
try {
|
||||
println("Program picked: " + prog.getName());
|
||||
}
|
||||
finally {
|
||||
prog.release(this); // will remain open in tool if applicable
|
||||
}
|
||||
}
|
||||
|
||||
DomainFile domFile = askDomainFile("Which domain file would you like?");
|
||||
println("Domain file: " + domFile.getName());
|
||||
|
||||
@@ -38,19 +38,24 @@ public class CompareAnalysisScript extends GhidraScript {
|
||||
if (otherProgram == null) {
|
||||
return;
|
||||
}
|
||||
println("\n\n****** COMPARING FUNCTIONS:\n");
|
||||
compareFunctions(otherProgram);
|
||||
println("\n\n****** COMPARING STRINGS:\n");
|
||||
compareStrings(otherProgram);
|
||||
println("\n\n****** PERCENT ANALYZED COMPARE SUMMARY:\n");
|
||||
reportPercentDisassembled(currentProgram);
|
||||
reportPercentDisassembled(otherProgram);
|
||||
println("\n\n****** COMPARING SWITCH TABLES:\n");
|
||||
compareSwitchTables(otherProgram);
|
||||
println("\n\n****** COMPARING NON-RETURNING FUNCTIONS:\n");
|
||||
compareNoReturns(otherProgram);
|
||||
println("\n\n****** COMPARING ERRORS:\n");
|
||||
compareErrors(otherProgram);
|
||||
try {
|
||||
println("\n\n****** COMPARING FUNCTIONS:\n");
|
||||
compareFunctions(otherProgram);
|
||||
println("\n\n****** COMPARING STRINGS:\n");
|
||||
compareStrings(otherProgram);
|
||||
println("\n\n****** PERCENT ANALYZED COMPARE SUMMARY:\n");
|
||||
reportPercentDisassembled(currentProgram);
|
||||
reportPercentDisassembled(otherProgram);
|
||||
println("\n\n****** COMPARING SWITCH TABLES:\n");
|
||||
compareSwitchTables(otherProgram);
|
||||
println("\n\n****** COMPARING NON-RETURNING FUNCTIONS:\n");
|
||||
compareNoReturns(otherProgram);
|
||||
println("\n\n****** COMPARING ERRORS:\n");
|
||||
compareErrors(otherProgram);
|
||||
}
|
||||
finally {
|
||||
otherProgram.release(this);
|
||||
}
|
||||
}
|
||||
|
||||
void compareFunctions(Program otherProgram) {
|
||||
|
||||
Reference in New Issue
Block a user