Package ghidra.app.util.bin.format.dwarf
Class DWARFFunction
java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFFunction
Represents a function that was read from DWARF information.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsChangeModifier and TypeFieldDescriptionNEWbooleanbooleanbooleanbooleanREMOVEDRemoved -
Method Summary
ChangeModifier and TypeMethodDescriptionasFunctionDefinition(boolean includeCC) Returns aFunctionDefinitionthat reflects this function's information.voidgetBody()longstatic AddressRangegetFuncBody(DIEAggregate diea, boolean flattenDisjoint) static DWARFRangeListgetLocalVarByOffset(long offset) Returns the DWARFVariable that starts at the specified stack offset.Returns the parameters of this function asParameterDefinitions.getParameters(boolean includeStorageDetail) Returns this function's parameters as a list ofParameterinstances.booleanbooleanbooleanisInLocalVarStorageArea(long offset) Returns true if the specified stack offset is within the function's local variable storage area.MODIFIEDstatic DWARFFunctionread(DIEAggregate diea) Create a function instance from the information found in the specified DIEA.voidbooleansyncWithExistingGhidraFunction(boolean createIfMissing) toString()void
-
Field Details
-
diea
-
name
-
namespace
-
address
-
function
-
funcEntryFrameBaseLoc NEW
-
callingConventionName
-
retval
-
params
-
varArg
public boolean varArg -
localVars
-
localVarErrors
public boolean localVarErrors -
signatureCommitMode
-
noReturn
public boolean noReturn -
sourceInfo
-
isExternal
public boolean isExternal
-
-
Method Details
-
read MODIFIED
removed throws DWARFExpressionException-static ghidra.app.util.bin.format.dwarf.DWARFFunction read(ghidra.app.util.bin.format.dwarf.DIEAggregate diea) throws IOException, DWARFExpressionException+static ghidra.app.util.bin.format.dwarf.DWARFFunction read(ghidra.app.util.bin.format.dwarf.DIEAggregate diea) throws IOExceptionCreate a function instance from the information found in the specified DIEA.- Parameters:
diea- DW_TAG_subprogramDIEAggregate- Returns:
- new
DWARFFunction, or null if invalid DWARF information - Throws:
IOException- if error accessing attribute valuesDWARFExpressionException(removed)
-
getProgram
-
getDescriptiveName
-
getRangeList
-
getCallingConventionName
-
getBody
-
getEntryPc
public long getEntryPc() -
getLocalVarByOffset
Returns the DWARFVariable that starts at the specified stack offset.- Parameters:
offset- stack offset- Returns:
- local variable that starts at offset, or null if not present
-
isInLocalVarStorageArea
public boolean isInLocalVarStorageArea(long offset) Returns true if the specified stack offset is within the function's local variable storage area.- Parameters:
offset- stack offset to test- Returns:
- true if stack offset is within this function's local variable area
-
hasConflictWithParamStorage
- Throws:
InvalidInputException
-
hasConflictWithExistingLocalVariableStorage
public boolean hasConflictWithExistingLocalVariableStorage(DWARFVariable dvar) throws InvalidInputException - Throws:
InvalidInputException
-
getAllParamNames
-
getAllLocalVariableNames
-
getExistingLocalVariableNames
-
getNonParamSymbolNames
-
getParameters
Returns this function's parameters as a list ofParameterinstances.- Parameters:
includeStorageDetail- boolean flag, if true storage information will be included, if false, VariableStorage.UNASSIGNED_STORAGE will be used- Returns:
- list of Parameters
- Throws:
InvalidInputException- if bad information in param storage
-
getParameterDefinitions
Returns the parameters of this function asParameterDefinitions.- Returns:
- array of
ParameterDefinitions
-
commitLocalVariable
-
getFuncBody
public static AddressRange getFuncBody(DIEAggregate diea, boolean flattenDisjoint) throws IOException - Throws:
IOException
-
getFuncBodyRanges
- Throws:
IOException
-
syncWithExistingGhidraFunction
public boolean syncWithExistingGhidraFunction(boolean createIfMissing) -
runFixups
public void runFixups() -
updateFunctionSignature
public void updateFunctionSignature() -
asFunctionDefinition
Returns aFunctionDefinitionthat reflects this function's information.- Parameters:
includeCC- boolean flag, if true the returned funcdef will include calling convention- Returns:
FunctionDefinitionthat reflects this function's information
-
toString
-