Merge remote-tracking branch 'origin/GP-0_ghidra1_GhidraProjectCleanup'

This commit is contained in:
ghidra1 2023-02-22 10:00:39 -05:00
commit bdc6f56c40

View File

@ -599,21 +599,15 @@ public class GhidraProject {
AutoAnalysisManager mgr = AutoAnalysisManager.getAnalysisManager(program);
mgr.initializeOptions();
}
openPrograms.put(program, new Integer(id));
openPrograms.put(program, id);
}
public Program importProgram(File file, Language language, CompilerSpec compilerSpec)
throws CancelledException, DuplicateNameException, InvalidNameException,
VersionException, IOException {
return importProgram(file, (DomainFolder) null, language, compilerSpec);
}
public Program importProgram(File file, DomainFolder domainFolder, Language language,
public Program importProgram(File file, Language language,
CompilerSpec compilerSpec) throws CancelledException, DuplicateNameException,
InvalidNameException, VersionException, IOException {
MessageLog messageLog = new MessageLog();
LoadResults<Program> loadResults = AutoImporter.importByLookingForLcs(file, project,
domainFolder.getPathname(), language, compilerSpec, this, messageLog, MONITOR);
LoadResults<Program> loadResults = AutoImporter.importByLookingForLcs(file, project, null,
language, compilerSpec, this, messageLog, MONITOR);
Program program = loadResults.getPrimaryDomainObject();
loadResults.releaseNonPrimary(this);
initializeProgram(program, false);
@ -653,16 +647,11 @@ public class GhidraProject {
return loadResults.getPrimaryDomainObject();
}
public Program importProgram(File file) throws CancelledException, DuplicateNameException,
InvalidNameException, VersionException, IOException {
return importProgram(file, (DomainFolder) null);
}
public Program importProgram(File file, DomainFolder domainFolder) throws CancelledException,
public Program importProgram(File file) throws CancelledException,
DuplicateNameException, InvalidNameException, VersionException, IOException {
MessageLog messageLog = new MessageLog();
LoadResults<Program> loadResults = AutoImporter.importByUsingBestGuess(file, project,
domainFolder.getPathname(), this, messageLog, MONITOR);
null, this, messageLog, MONITOR);
Program program = loadResults.getPrimaryDomainObject();
loadResults.releaseNonPrimary(this);
initializeProgram(program, false);