mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-5682 - VxWorksSymTab script headless fix
This commit is contained in:
parent
bcb2d2934e
commit
667e439550
1 changed files with 5 additions and 28 deletions
|
@ -47,7 +47,6 @@ import ghidra.app.cmd.disassemble.DisassembleCommand;
|
|||
import ghidra.app.cmd.label.DemanglerCmd;
|
||||
import ghidra.app.plugin.core.analysis.AutoAnalysisManager;
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.app.services.DataTypeManagerService;
|
||||
import ghidra.app.util.demangler.DemangledException;
|
||||
import ghidra.app.util.demangler.MangledContext;
|
||||
import ghidra.app.util.demangler.gnu.GnuDemangler;
|
||||
|
@ -64,28 +63,6 @@ public class VxWorksSymTab_Finder extends GhidraScript {
|
|||
|
||||
boolean debug = false;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// getDataTypeManagerByName
|
||||
//
|
||||
// Retrieves data type manager by name.
|
||||
//
|
||||
// Returns:
|
||||
// Success: DataTypeManager
|
||||
// Failure: null
|
||||
//------------------------------------------------------------------------
|
||||
private DataTypeManager getDataTypeManagerByName(String name) {
|
||||
|
||||
DataTypeManagerService service = state.getTool().getService(DataTypeManagerService.class);
|
||||
|
||||
// Loop through all managers in the data type manager service
|
||||
for (DataTypeManager manager : service.getDataTypeManagers()) {
|
||||
if (manager.getName().equals(name)) {
|
||||
return manager;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// VxSymbol
|
||||
//
|
||||
|
@ -159,7 +136,7 @@ public class VxWorksSymTab_Finder extends GhidraScript {
|
|||
private VxSymbol getVxSymbolClass(int type) {
|
||||
|
||||
// Pre-define base data types used to define symbol table entry data type
|
||||
DataTypeManager builtin = getDataTypeManagerByName("BuiltInTypes");
|
||||
BuiltInDataTypeManager builtin = BuiltInDataTypeManager.getDataTypeManager();
|
||||
DataType charType = builtin.getDataType("/char");
|
||||
DataType charPtrType = PointerDataType.getPointer(charType, 4);
|
||||
DataType byteType = builtin.getDataType("/byte");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue