Class DWARFSourceInfo
java.lang.Object
ghidra.app.util.bin.format.dwarf4.next.DWARFSourceInfo
Small class to hold the filename and line number info values from
DWARF
DIEs.-
Method Summary
Modifier and TypeMethodDescriptionstatic DWARFSourceInfocreate(DIEAggregate diea) Creates a newDWARFSourceInfoinstance from the suppliedDIEAggregateif the info is present, otherwise returns null;booleanReturns the source location info as a string formatted as "filename:linenum"static StringReturns the source file and line number info attached to the specifiedDIEAggregateformatted asgetDescriptionStr(), or null if not present.Returns the source location info as a string formatted as "File: filename Line: linenum"Returns the filenamestatic DWARFSourceInfoCreates a newDWARFSourceInfoinstance from the suppliedDIEAggregate, falling back to the parent containing DIE record if the first record did not have any source info.inthashCode()toString()
-
Method Details
-
create
Creates a newDWARFSourceInfoinstance from the suppliedDIEAggregateif the info is present, otherwise returns null;- Parameters:
diea-DIEAggregateto query for source info- Returns:
- new
DWARFSourceInfowith filename:linenum info, or null if no info present in DIEA.
-
getSourceInfoWithFallbackToParent
Creates a newDWARFSourceInfoinstance from the suppliedDIEAggregate, falling back to the parent containing DIE record if the first record did not have any source info.- Parameters:
diea-DIEAggregateto query for source info.- Returns:
- new
DWARFSourceInfowith filename:linenum info, or null if no info present in the specified DIEA and its parent.
-
getDescriptionStr
Returns the source file and line number info attached to the specifiedDIEAggregateformatted asgetDescriptionStr(), or null if not present.- Parameters:
diea-DIEAggregateto query- Returns:
- string, see
getDescriptionStr()
-
getFilename
Returns the filename- Returns:
- string filename.
-
getDescriptionStr
Returns the source location info as a string formatted as "filename:linenum"- Returns:
- "filename:linenum"
-
getDescriptionStr2
Returns the source location info as a string formatted as "File: filename Line: linenum"- Returns:
- "File: filename Line: linenum"
-
hashCode
public int hashCode() -
equals
-
toString
-