Package ghidra.app.util.bin.format.dwarf
Class DWARFIndirectTable
java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFIndirectTable
Handles a grouping of
DWARFIndirectTableHeader
s that specify how to look up a
certain type of item (per CU).-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionDWARFIndirectTable
(BinaryReader reader, Function<DWARFCompilationUnit, Long> baseOffsetFunc) Creates aDWARFIndirectTable
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bootstrap
(String msg, DWARFIndirectTable.CheckedIOFunction<BinaryReader, ? extends DWARFIndirectTableHeader> headerReader, TaskMonitor monitor) Populates this instance will allDWARFIndirectTableHeader
instances that can be read from the stream.void
clear()
long
getOffset
(int index, DWARFCompilationUnit cu) Returns the offset of an item, based on its index in a particular header (which is found by the controlling CU)
-
Constructor Details
-
DWARFIndirectTable
Creates aDWARFIndirectTable
- Parameters:
reader
-BinaryReader
containing theDWARFIndirectTableHeader
sbaseOffsetFunc
- a function that will return the baseoffset value for aDWARFCompilationUnit
.
-
-
Method Details
-
bootstrap
public void bootstrap(String msg, DWARFIndirectTable.CheckedIOFunction<BinaryReader, ? extends DWARFIndirectTableHeader> headerReader, TaskMonitor monitor) throws CancelledException, IOExceptionPopulates this instance will allDWARFIndirectTableHeader
instances that can be read from the stream.- Parameters:
msg
- String message to use for the taskmonitorheaderReader
- a function that reads the specific table header type from the streammonitor
-TaskMonitor
- Throws:
CancelledException
- if cancelledIOException
- if error reading a header
-
getOffset
Returns the offset of an item, based on its index in a particular header (which is found by the controlling CU)- Parameters:
index
- index of the itemcu
-DWARFCompilationUnit
- Returns:
- long offset of the item. Caller responsible for reading the item themselves
- Throws:
IOException
- if error reading table data
-
clear
public void clear()
-