Interface DWARFSectionProvider
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
BaseSectionProvider,CompressedSectionProvider,DSymSectionProvider,ExternalDebugFileSectionProvider,NullSectionProvider
A DWARFSectionProvider is responsible for allowing access to DWARF section data of
a Ghidra program.
Implementors of this interface need to be registered in
DWARFSectionProviderFactory.sectionProviderFactoryFuncs and should implement the
static method:
public static DWARFSectionProvider createSectionProviderFor(Program program, TaskMonitor monitor)
that is called via a java Function wrapper.
DWARFSectionProvider instances are responsible for closing
any ByteProvider that has been returned via
getSectionAsByteProvider(String, TaskMonitor) when the section provider instance is
itself closed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getSectionAsByteProvider(String sectionName, TaskMonitor monitor) Returns a ByteProvider for the specified section.booleanhasSection(String... sectionNames) Returns true if the specified section names are present.default voidupdateProgramInfo(Program program) Decorate the specified program with any information that is unique to this section provider.
-
Method Details
-
hasSection
Returns true if the specified section names are present.- Parameters:
sectionNames- list of section names to test- Returns:
- true if all are present, false if not present
-
getSectionAsByteProvider
Returns a ByteProvider for the specified section.- Parameters:
sectionName- name of the sectionmonitor-TaskMonitorto use when performing long operations- Returns:
- ByteProvider, which will be closed by the section provider when itself is closed
- Throws:
IOException- if error
-
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
updateProgramInfo
Decorate the specified program with any information that is unique to this section provider.- Parameters:
program-Programwith an active transaction
-