Class BaseSectionProvider
java.lang.Object
ghidra.app.util.bin.format.dwarf.sectionprovider.BaseSectionProvider
- All Implemented Interfaces:
DWARFSectionProvider
,Closeable
,AutoCloseable
- Direct Known Subclasses:
ExternalDebugFileSectionProvider
Fetches DWARF sections from a normal program using simple Ghidra memory blocks.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static BaseSectionProvider
createSectionProviderFor
(Program program, TaskMonitor monitor) protected MemoryBlock
getSection
(String sectionName) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.app.util.bin.format.dwarf.sectionprovider.DWARFSectionProvider
updateProgramInfo
-
Field Details
-
program
-
sectionPrefixes
-
-
Constructor Details
-
BaseSectionProvider
-
-
Method Details
-
createSectionProviderFor
-
getSectionPrefixSearchList
-
getSectionAsByteProvider
public ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor) throws IOException Description copied from interface:DWARFSectionProvider
Returns a ByteProvider for the specified section.- Specified by:
getSectionAsByteProvider
in interfaceDWARFSectionProvider
- 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
-
hasSection
Description copied from interface:DWARFSectionProvider
Returns true if the specified section names are present.- Specified by:
hasSection
in interfaceDWARFSectionProvider
- Parameters:
sectionNames
- list of section names to test- Returns:
- true if all are present, false if not present
-
getSection
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceDWARFSectionProvider
-