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 TypeMethodDescriptionvoid
close()
getSectionAsByteProvider
(String sectionName, TaskMonitor monitor) Returns a ByteProvider for the specified section.boolean
hasSection
(String... sectionNames) Returns true if the specified section names are present.default void
updateProgramInfo
(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
-TaskMonitor
to 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
updateProgramInfo
Decorate the specified program with any information that is unique to this section provider.- Parameters:
program
-Program
with an active transaction
-