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 DWARFSourceInfo
create
(DIEAggregate diea) Creates a newDWARFSourceInfo
instance from the suppliedDIEAggregate
if the info is present, otherwise returns null;boolean
Returns the source location info as a string formatted as "filename:linenum"static String
Returns the source file and line number info attached to the specifiedDIEAggregate
formatted asgetDescriptionStr()
, or null if not present.Returns the source location info as a string formatted as "File: filename Line: linenum"Returns the filenamestatic DWARFSourceInfo
Creates a newDWARFSourceInfo
instance from the suppliedDIEAggregate
, falling back to the parent containing DIE record if the first record did not have any source info.int
hashCode()
toString()
-
Method Details
-
create
Creates a newDWARFSourceInfo
instance from the suppliedDIEAggregate
if the info is present, otherwise returns null;- Parameters:
diea
-DIEAggregate
to query for source info- Returns:
- new
DWARFSourceInfo
with filename:linenum info, or null if no info present in DIEA.
-
getSourceInfoWithFallbackToParent
Creates a newDWARFSourceInfo
instance from the suppliedDIEAggregate
, falling back to the parent containing DIE record if the first record did not have any source info.- Parameters:
diea
-DIEAggregate
to query for source info.- Returns:
- new
DWARFSourceInfo
with 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 specifiedDIEAggregate
formatted asgetDescriptionStr()
, or null if not present.- Parameters:
diea
-DIEAggregate
to 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
-