Package ghidra.app.util.bin.format.dwarf
Class DWARFDataTypeImporter
java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter
Creates Ghidra
DataType
s using information from DWARF debug entries. The caller
is responsible for writing the resulting temporary DataType instances into the database.
Create a new instance of this class for each DIEAggregate
datatype that you wish
to convert into a DataType.
-
Constructor Summary
ConstructorDescriptionDWARFDataTypeImporter
(DWARFProgram prog, DWARFDataTypeManager dwarfDTM) Create a new data type importer. -
Method Summary
Modifier and TypeMethodDescriptionghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter.DWARFDataType
getDataType
(DIEAggregate diea, ghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter.DWARFDataType defaultValue) Converts the specified DWARF debug entry into a GhidraDataType
(wrapped in a simple holder object to also return associated metadata).ghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter.DWARFDataType
getDDTByInstance
(DataType dtInstance)
-
Constructor Details
-
DWARFDataTypeImporter
Create a new data type importer.- Parameters:
prog
-DWARFProgram
that is being importeddwarfDTM
-DWARFDataTypeManager
helper
-
-
Method Details
-
getDDTByInstance
public ghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter.DWARFDataType getDDTByInstance(DataType dtInstance) -
getDataType
public ghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter.DWARFDataType getDataType(DIEAggregate diea, ghidra.app.util.bin.format.dwarf.DWARFDataTypeImporter.DWARFDataType defaultValue) throws IOException, DWARFExpressionException Converts the specified DWARF debug entry into a GhidraDataType
(wrapped in a simple holder object to also return associated metadata).- Parameters:
diea
- DWARFDIEAggregate
to convert into Ghidra DataType.defaultValue
- value to return if the specified DIEA is null or there is a problem with the DWARF debug data.- Returns:
- a
DWARFDataTypeImporter.DWARFDataType
wrapper around the new GhidraDataType
. - Throws:
IOException
DWARFExpressionException
-