mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 05:32:14 +00:00
GP-3616 corrected bad merge
This commit is contained in:
parent
379ddbfc39
commit
0952f5839f
@ -22,8 +22,8 @@ import db.DBConstants;
|
||||
import generic.jar.ResourceFile;
|
||||
import ghidra.framework.store.db.PackedDBHandle;
|
||||
import ghidra.framework.store.db.PackedDatabase;
|
||||
import ghidra.program.model.lang.*;
|
||||
import ghidra.program.util.DefaultLanguageService;
|
||||
import ghidra.program.model.lang.CompilerSpec;
|
||||
import ghidra.program.model.lang.Language;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.UniversalID;
|
||||
import ghidra.util.exception.*;
|
||||
@ -98,54 +98,6 @@ public class FileDataTypeManager extends StandAloneDataTypeManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new data-type file archive using the default data organization
|
||||
* @param packedDbfile archive file (filename must end with DataTypeFileManager.SUFFIX)
|
||||
* @return data-type manager backed by specified packedDbFile
|
||||
* @throws IOException if an IO error occurs
|
||||
*/
|
||||
public static FileDataTypeManager createFileArchive(File packedDbfile, LanguageID languageId,
|
||||
CompilerSpecID compilerSpecId)
|
||||
throws LanguageNotFoundException, CompilerSpecNotFoundException, IOException {
|
||||
try {
|
||||
FileDataTypeManager dtm =
|
||||
new FileDataTypeManager(new ResourceFile(packedDbfile), DBConstants.CREATE,
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
LanguageService languageService = DefaultLanguageService.getLanguageService();
|
||||
Language language = languageService.getLanguage(languageId);
|
||||
CompilerSpec compilerSpec = language.getCompilerSpecByID(compilerSpecId);
|
||||
|
||||
//dtm.setProgramArchitecture()
|
||||
return dtm;
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
throw new AssertException(e); // unexpected without task monitor use
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new data-type file archive using the default data organization
|
||||
* @param packedDbfile archive file (filename must end with DataTypeFileManager.SUFFIX)
|
||||
* @return data-type manager backed by specified packedDbFile
|
||||
* @throws IOException if an IO error occurs
|
||||
*/
|
||||
public static FileDataTypeManager createFileArchive(File packedDbfile, String languageId,
|
||||
String compilerSpecId) throws IOException {
|
||||
try {
|
||||
FileDataTypeManager dtm =
|
||||
new FileDataTypeManager(new ResourceFile(packedDbfile), DBConstants.CREATE,
|
||||
TaskMonitor.DUMMY);
|
||||
|
||||
//dtm.setProgramArchitecture()
|
||||
|
||||
return dtm;
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
throw new AssertException(e); // unexpected without task monitor use
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Open an existing data-type file archive using the default data organization.
|
||||
* <p>
|
||||
|
Loading…
Reference in New Issue
Block a user