Package ghidra.app.util.bin.format.dwarf
Class DWARFIndirectTable
java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFIndirectTable
Handles a grouping of
DWARFIndirectTableHeaders that specify how to look up a
certain type of item (per CU).-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDWARFIndirectTable(BinaryReader reader, Function<DWARFCompilationUnit, Long> baseOffsetFunc) Creates aDWARFIndirectTable -
Method Summary
Modifier and TypeMethodDescriptionvoidbootstrap(String msg, DWARFIndirectTable.CheckedIOFunction<BinaryReader, ? extends DWARFIndirectTableHeader> headerReader, TaskMonitor monitor) Populates this instance will allDWARFIndirectTableHeaderinstances that can be read from the stream.voidclear()longgetOffset(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-BinaryReadercontaining theDWARFIndirectTableHeadersbaseOffsetFunc- 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 allDWARFIndirectTableHeaderinstances 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()
-