Class GolangDWARFFunctionFixup
java.lang.Object
ghidra.app.util.bin.format.golang.GolangDWARFFunctionFixup
- All Implemented Interfaces:
DWARFFunctionFixup
,ExtensionPoint
Fixups for golang functions found during DWARF processing.
Fixes storage of parameters to match the go callspec and modifies parameter lists to match Ghidra's capabilities.
Special characters used by golang in symbol names (middle dot ·, weird slash ∕) are fixed up in DWARFProgram.getDWARFNameInfo() by calling GoSymbolName.fixGolangSpecialSymbolnameChars().
Go's 'unique' usage of DW_TAG_subroutine_type to define its ptr-to-ptr-to-func is handled in DWARFDataTypeImporter.makeDataTypeForFunctionDefinition().
-
Field Summary
Fields inherited from interface ghidra.app.util.bin.format.dwarf.funcfixup.DWARFFunctionFixup
PRIORITY_LAST, PRIORITY_NORMAL, PRIORITY_NORMAL_EARLY, PRIORITY_NORMAL_LATE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fixupDWARFFunction
(DWARFFunction dfunc) Called before aDWARFFunction
is used to create a Ghidra Function.static boolean
isGolangFunction
(DWARFFunction dfunc) Returns true if the specifiedDWARFFunction
wrapper refers to a function in a golang compile unit.
-
Field Details
-
GOLANG_API_EXPORT
-
-
Constructor Details
-
GolangDWARFFunctionFixup
public GolangDWARFFunctionFixup()
-
-
Method Details
-
isGolangFunction
Returns true if the specifiedDWARFFunction
wrapper refers to a function in a golang compile unit.- Parameters:
dfunc
-DWARFFunction
- Returns:
- boolean true or false
-
fixupDWARFFunction
Description copied from interface:DWARFFunctionFixup
Called before aDWARFFunction
is used to create a Ghidra Function.If processing of the function should terminate (and the function be skipped), throw a
DWARFException
.- Specified by:
fixupDWARFFunction
in interfaceDWARFFunctionFixup
- Parameters:
dfunc
-DWARFFunction
info read from DWARF about the function- Throws:
DWARFException
-