Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-2106 dwarf compressed sections

dev747368bd54e3a0d3e0
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/DWARFProgram.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/DWARFProgram.java
index e9296f5540..3b27cfa59c 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/DWARFProgram.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/DWARFProgram.java
@@ -56,9 +56,11 @@ public class DWARFProgram implements Closeable {
private static final String ELLIPSES_STR = "...";
/**
- * Returns true if the {@link Program program} probably has DWARF information.
+ * Returns true if the {@link Program program} probably has DWARF information, without doing
+ * all the work that querying all registered DWARFSectionProviders would take.
* <p>
- * If the program is an Elf binary, it must have (at least) ".debug_info" and ".debug_abbr" program sections.
+ * If the program is an Elf binary, it must have (at least) ".debug_info" and ".debug_abbr",
+ * program sections, or their compressed "z" versions.
* <p>
* If the program is a MachO binary (ie. Mac), it must have a ".dSYM" directory co-located next to the
* original binary file on the native filesystem. (ie. outside of Ghidra). See the DSymSectionProvider
@@ -73,7 +75,7 @@ public class DWARFProgram implements Closeable {
switch (format) {
case ElfLoader.ELF_NAME:
case PeLoader.PE_NAME:
- return BaseSectionProvider.hasDWARFSections(program) ||
+ return hasExpectedDWARFSections(program) ||
ExternalDebugInfo.fromProgram(program) != null;
case MachoLoader.MACH_O_NAME:
return DSymSectionProvider.getDSYMForProgram(program) != null;
@@ -81,6 +83,15 @@ public class DWARFProgram implements Closeable {
return false;
}
+ private static boolean hasExpectedDWARFSections(Program program) {
+ // the compressed section provider will find normally named sections as well
+ // as compressed sections
+ try (DWARFSectionProvider tmp =
+ new CompressedSectionProvider(new BaseSectionProvider(program))) {
+ return tmp.hasSection(DWARFSectionNames.MINIMAL_DWARF_SECTIONS);
+ }
+ }
+
/**
* Returns true if the specified {@link Program program} has DWARF information.
* <p>
@@ -178,7 +189,7 @@ public class DWARFProgram implements Closeable {
public DWARFProgram(Program program, DWARFImportOptions importOptions, TaskMonitor monitor)
throws CancelledException, IOException, DWARFException {
this(program, importOptions, monitor,
- DWARFSectionProviderFactory.createSectionProviderFor(program));
+ DWARFSectionProviderFactory.createSectionProviderFor(program, monitor));
}
/**
@@ -208,16 +219,16 @@ public class DWARFProgram implements Closeable {
monitor.setMessage("Reading DWARF debug string table");
this.debugStrings = StringTable.readStringTable(
- sectionProvider.getSectionAsByteProvider(DWARFSectionNames.DEBUG_STR));
+ sectionProvider.getSectionAsByteProvider(DWARFSectionNames.DEBUG_STR, monitor));
// Msg.info(this, "Read DWARF debug string table, " + debugStrings.getByteCount() + " bytes.");
this.attributeFactory = new DWARFAttributeFactory(this);
- this.debugLocation = getBinaryReaderFor(DWARFSectionNames.DEBUG_LOC);
- this.debugInfoBR = getBinaryReaderFor(DWARFSectionNames.DEBUG_INFO);
- this.debugLineBR = getBinaryReaderFor(DWARFSectionNames.DEBUG_LINE);
- this.debugAbbrBR = getBinaryReaderFor(DWARFSectionNames.DEBUG_ABBREV);
- this.debugRanges = getBinaryReaderFor(DWARFSectionNames.DEBUG_RANGES);// sectionProvider.getSectionAsByteProvider(DWARFSectionNames.DEBUG_RANGES);
+ this.debugLocation = getBinaryReaderFor(DWARFSectionNames.DEBUG_LOC, monitor);
+ this.debugInfoBR = getBinaryReaderFor(DWARFSectionNames.DEBUG_INFO, monitor);
+ this.debugLineBR = getBinaryReaderFor(DWARFSectionNames.DEBUG_LINE, monitor);
+ this.debugAbbrBR = getBinaryReaderFor(DWARFSectionNames.DEBUG_ABBREV, monitor);
+ this.debugRanges = getBinaryReaderFor(DWARFSectionNames.DEBUG_RANGES, monitor);
// if there are relocations (already handled by the ghidra loader) anywhere in the debuginfo or debugrange sections, then
// we don't need to manually fix up addresses extracted from DWARF data.
@@ -267,8 +278,9 @@ public class DWARFProgram implements Closeable {
return !program.getLanguage().isBigEndian();
}
- private BinaryReader getBinaryReaderFor(String sectionName) throws IOException {
- ByteProvider bp = sectionProvider.getSectionAsByteProvider(sectionName);
+ private BinaryReader getBinaryReaderFor(String sectionName, TaskMonitor monitor)
+ throws IOException {
+ ByteProvider bp = sectionProvider.getSectionAsByteProvider(sectionName, monitor);
return (bp != null) ? new BinaryReader(bp, !isBigEndian()) : null;
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/BaseSectionProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/BaseSectionProvider.java
index 25ea7fed7a..8cf5384d68 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/BaseSectionProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/BaseSectionProvider.java
@@ -21,6 +21,7 @@ import ghidra.app.util.bin.ByteProvider;
import ghidra.app.util.bin.MemoryByteProvider;
import ghidra.program.model.listing.Program;
import ghidra.program.model.mem.MemoryBlock;
+import ghidra.util.task.TaskMonitor;
/**
* Fetches DWARF sections from a normal program using simple Ghidra memory blocks.
@@ -28,13 +29,8 @@ import ghidra.program.model.mem.MemoryBlock;
public class BaseSectionProvider implements DWARFSectionProvider {
protected Program program;
- public static boolean hasDWARFSections(Program program) {
- try (BaseSectionProvider tmp = new BaseSectionProvider(program)) {
- return tmp.hasSection(DWARFSectionNames.MINIMAL_DWARF_SECTIONS);
- }
- }
-
- public static BaseSectionProvider createSectionProviderFor(Program program) {
+ public static BaseSectionProvider createSectionProviderFor(Program program,
+ TaskMonitor monitor) {
return new BaseSectionProvider(program);
}
@@ -43,15 +39,17 @@ public class BaseSectionProvider implements DWARFSectionProvider {
}
@Override
- public ByteProvider getSectionAsByteProvider(String sectionName) throws IOException {
+ public ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor)
+ throws IOException {
MemoryBlock block = program.getMemory().getBlock(sectionName);
if (block == null) {
block = program.getMemory().getBlock("." + sectionName);
}
if (block != null && block.isInitialized()) {
- // TODO: limit the returned ByteProvider to block.getSize() bytes
- return new MemoryByteProvider(program.getMemory(), block.getStart());
+ // NOTE: MemoryByteProvider instances don't need to be closed(), so we don't
+ // track them here
+ return MemoryByteProvider.createMemoryBlockByteProvider(program.getMemory(), block);
}
return null;
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/CompressedSectionProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/CompressedSectionProvider.java
index 2cdac26ca5..9049d4a18a 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/CompressedSectionProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/CompressedSectionProvider.java
@@ -15,28 +15,30 @@
*/
package ghidra.app.util.bin.format.dwarf4.next.sectionprovider;
-import ghidra.app.util.bin.ByteArrayProvider;
-import ghidra.app.util.bin.ByteProvider;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import java.util.zip.DataFormatException;
-import java.util.zip.Inflater;
+import java.util.zip.InflaterInputStream;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import ghidra.app.util.bin.BinaryReader;
+import ghidra.app.util.bin.ByteProvider;
+import ghidra.formats.gfilesystem.FSUtilities;
+import ghidra.formats.gfilesystem.FileCache.FileCacheEntry;
+import ghidra.formats.gfilesystem.FileCache.FileCacheEntryBuilder;
+import ghidra.formats.gfilesystem.FileSystemService;
+import ghidra.util.exception.CancelledException;
+import ghidra.util.task.TaskMonitor;
/**
- * Fetches DWARF section data that has been compressed from an underlying {@link DWARFSectionProvider}.
+ * A wrapper around another DWARFSectionProvider, this provider
+ * fetches DWARF section data that has been compressed and stored in sections in the underlying
+ * {@link DWARFSectionProvider}.
* <p>
- * Note, this code has not been tested against real data but is included here as it was in
- * the original DWARF code base. This section provider is not currently
- * registered in the {@link DWARFSectionProviderFactory} and as such will not be
- * used.
- * <p>
- * TODO: the decompressed data should be stored in something other than in-memory byte arrays,
- * probably should use tmp files.
*/
public class CompressedSectionProvider implements DWARFSectionProvider {
+ private static final int ZLIB_MAGIC_BE = 0x5a4c4942; // "ZLIB"
private final DWARFSectionProvider sp;
@@ -44,7 +46,7 @@ public class CompressedSectionProvider implements DWARFSectionProvider {
* Cache previously decompressed sections, indexed by their normal 'base' name with no
* 'z' prefix.
*/
- private Map<String, ByteProvider> sectionNameToDecompressedSectionDataMap = new HashMap<>();
+ private Map<String, ByteProvider> decompressedSectionCache = new HashMap<>();
public CompressedSectionProvider(DWARFSectionProvider sp) {
this.sp = sp;
@@ -65,49 +67,60 @@ public class CompressedSectionProvider implements DWARFSectionProvider {
}
@Override
- public ByteProvider getSectionAsByteProvider(String sectionName) throws IOException {
- ByteProvider bp = sp.getSectionAsByteProvider(sectionName);
+ public ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor)
+ throws IOException {
+ ByteProvider bp = sp.getSectionAsByteProvider(sectionName, monitor);
if (bp != null) {
return bp;
}
- bp = sectionNameToDecompressedSectionDataMap.get(sectionName);
+ bp = decompressedSectionCache.get(sectionName);
if (bp != null) {
return bp;
}
- bp = sp.getSectionAsByteProvider("z" + sectionName);
+ bp = sp.getSectionAsByteProvider("z" + sectionName, monitor);
if (bp != null) {
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- byte[] tempArray = new byte[1024];
-
- Inflater decompressor = new Inflater();
- decompressor.setInput(bp.readBytes(0, bp.length()));
-
- while (!decompressor.finished()) {
- try {
- int result = decompressor.inflate(tempArray);
- if (result == 0 && !decompressor.finished()) {
- throw new IOException("Zlib decompressor returned 0 bytes to inflate");
- }
- stream.write(tempArray, 0, result);
- }
- catch (DataFormatException e) {
- throw new IOException(e);
- }
- }
+ FileSystemService fsService = FileSystemService.getInstance();
+ try (
+ InputStream is = getInputStreamForCompressedSection(bp);
+ FileCacheEntryBuilder tmpFile = fsService.createTempFile(bp.length())) {
- ByteProvider decompressedBP = new ByteArrayProvider(stream.toByteArray());
- sectionNameToDecompressedSectionDataMap.put(sectionName, decompressedBP);
- return decompressedBP;
+ FSUtilities.streamCopy(is, tmpFile, monitor);
+
+ FileCacheEntry fce = tmpFile.finish();
+ ByteProvider decompressedBP =
+ fsService.getNamedTempFile(fce, "uncompressed_" + sectionName);
+ decompressedSectionCache.put(sectionName, decompressedBP);
+
+ return decompressedBP;
+ }
+ catch (CancelledException e) {
+ // fall thru
+ }
}
return null;
}
+ private InputStream getInputStreamForCompressedSection(ByteProvider compressedBP)
+ throws IOException {
+ BinaryReader reader = new BinaryReader(compressedBP, false /* BE */);
+ int magic = reader.readInt(0);
+ if (magic == ZLIB_MAGIC_BE) {
+ //long size = reader.readLong(4); // can't use size right now, but here it is if need it
+ int streamStart = 12; // sizeof(magic) + sizeof(long)
+ return new InflaterInputStream(compressedBP.getInputStream(streamStart));
+ }
+ throw new IOException("Unknown compressed section format: " + Integer.toHexString(magic));
+ }
+
@Override
public void close() {
+ for (ByteProvider bp : decompressedSectionCache.values()) {
+ FSUtilities.uncheckedClose(bp, null);
+ }
+ decompressedSectionCache.clear();
sp.close();
- sectionNameToDecompressedSectionDataMap.clear();
}
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DSymSectionProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DSymSectionProvider.java
index aa1a52c863..ff22331653 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DSymSectionProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DSymSectionProvider.java
@@ -15,15 +15,18 @@
*/
package ghidra.app.util.bin.format.dwarf4.next.sectionprovider;
-import java.io.File;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
+import java.io.File;
+import java.io.IOException;
+
import ghidra.app.util.bin.*;
import ghidra.app.util.bin.format.macho.*;
import ghidra.app.util.opinion.MachoLoader;
+import ghidra.formats.gfilesystem.FSUtilities;
import ghidra.program.model.listing.Program;
+import ghidra.util.task.TaskMonitor;
/**
* Fetches DWARF section data for a MachO program with co-located .dSYM folder. (ie. Mac OSX
@@ -35,7 +38,7 @@ public class DSymSectionProvider implements DWARFSectionProvider {
private RandomAccessByteProvider provider;
public static File getDSYMForProgram(Program program) {
-
+
File exePath = new File(program.getExecutablePath());
File dSymFile = new File(exePath.getParentFile(),
exePath.getName() + ".dSYM/Contents/Resources/DWARF/" + exePath.getName());
@@ -43,7 +46,8 @@ public class DSymSectionProvider implements DWARFSectionProvider {
return dSymFile.isFile() ? dSymFile : null;
}
- public static DSymSectionProvider createSectionProviderFor(Program program) {
+ public static DSymSectionProvider createSectionProviderFor(Program program,
+ TaskMonitor monitor) {
if (MachoLoader.MACH_O_NAME.equals(program.getExecutableFormat())) {
File dsymFile = getDSYMForProgram(program);
if (dsymFile != null) {
@@ -60,7 +64,7 @@ public class DSymSectionProvider implements DWARFSectionProvider {
public DSymSectionProvider(File dsymFile) throws IOException, MachException {
this.provider = new RandomAccessByteProvider(dsymFile);
-
+
machHeader = new MachHeader(provider);
machHeader.parse();
for (Section s : machHeader.getAllSections()) {
@@ -71,22 +75,17 @@ public class DSymSectionProvider implements DWARFSectionProvider {
}
@Override
- public ByteProvider getSectionAsByteProvider(String sectionName) throws IOException {
-
+ public ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor)
+ throws IOException {
+
Section s = machSectionsByName.get(sectionName);
return (s != null) ? new ByteProviderWrapper(provider,
machHeader.getStartIndex() + s.getOffset(), s.getSize()) : null;
}
@Override
- public void close()
- {
- try {
- provider.close();
- }
- catch (IOException e) {
- // ignore
- }
+ public void close() {
+ FSUtilities.uncheckedClose(provider, null);
}
@Override
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProvider.java
index d84580bc78..57b3f24e2b 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProvider.java
@@ -20,25 +20,54 @@ import java.io.IOException;
import ghidra.app.util.bin.ByteProvider;
import ghidra.program.model.listing.Program;
+import ghidra.util.task.TaskMonitor;
/**
* A DWARFSectionProvider is responsible for allowing access to DWARF section data of
* a Ghidra program.
* <p>
- * Implementors of this interface should probably be registered in {@link DWARFSectionProviderFactory}
- * so they can be auto-detected when queried and also need to implement the static method:
+ * Implementors of this interface need to be registered in
+ * {@link DWARFSectionProviderFactory#sectionProviderFactoryFuncs} and should implement the
+ * static method:
* <p>
- * <code>public static DWARFSectionProvider createSectionProviderFor(Program program)</code>
+ * <code>public static DWARFSectionProvider createSectionProviderFor(Program program, TaskMonitor monitor)</code>
* <p>
+ * that is called via a java Function wrapper.
+ * <p>
+ * DWARFSectionProvider instances are responsible for {@link ByteProvider#close() closing} any
+ * ByteProvider that has been returned via {@link #getSectionAsByteProvider(String)} when the
+ * section provider instance is itself closed.
+ *
*/
public interface DWARFSectionProvider extends Closeable {
+
+ /**
+ * Returns true if the specified section names are present.
+ *
+ * @param sectionNames list of section names to test
+ * @return true if all are present, false if not present
+ */
boolean hasSection(String... sectionNames);
- ByteProvider getSectionAsByteProvider(String sectionName) throws IOException;
+ /**
+ * Returns a ByteProvider for the specified section.
+ *
+ * @param sectionName name of the section
+ * @param monitor {@link TaskMonitor} to use when performing long operations
+ * @return ByteProvider, which will be closed by the section provider when itself is closed
+ * @throws IOException if error
+ */
+ ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor)
+ throws IOException;
@Override
void close();
+ /**
+ * Decorate the specified program with any information that is unique to this section provider.
+ *
+ * @param program {@link Program} with an active transaction
+ */
default void updateProgramInfo(Program program) {
// do nothing
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProviderFactory.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProviderFactory.java
index 4113a3e114..0b4c39829b 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProviderFactory.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/DWARFSectionProviderFactory.java
@@ -15,9 +15,10 @@
*/
package ghidra.app.util.bin.format.dwarf4.next.sectionprovider;
-import java.io.Closeable;
import java.util.List;
-import java.util.function.Function;
+import java.util.function.BiFunction;
+
+import java.io.Closeable;
import ghidra.program.model.listing.Program;
import ghidra.util.Msg;
@@ -29,19 +30,21 @@ import ghidra.util.task.TaskMonitor;
public class DWARFSectionProviderFactory {
/**
- * A list of references to static methods that will create a {@link DWARFSectionProvider}.
+ * A list of functions that will create a {@link DWARFSectionProvider}.
* <p>
* The method should return null if it can't parse the data it found in the {@link Program}.
* <p>
* The method does NOT need to worry about validating the presence of DWARF debug info
- * sections, as that will be done in {@link #createSectionProviderFor(Program)}.
+ * sections, as that will be done later via calls to DWARFSectionProvider.hasSection() and
+ * DWARFSectionProvider.getSectionAsByteProvider().
* <p>
* The method should not throw anything, instead just return a NULL.
*/
- private static final List<Function<Program, DWARFSectionProvider>> sectionProviderFactoryFuncs =
+ private static final List<BiFunction<Program, TaskMonitor, DWARFSectionProvider>> sectionProviderFactoryFuncs =
List.of(
BaseSectionProvider::createSectionProviderFor,
- DSymSectionProvider::createSectionProviderFor);
+ DSymSectionProvider::createSectionProviderFor,
+ ExternalDebugFileSectionProvider::createExternalSectionProviderFor);
/**
* Iterates through the statically registered {@link #sectionProviderFactoryFuncs factory funcs},
@@ -53,17 +56,26 @@ public class DWARFSectionProviderFactory {
* responsibility to ensure that the object is closed when done.
*
* @param program
+ * @param monitor {@link TaskMonitor}
* @return {@link DWARFSectionProvider} that should be closed by the caller or NULL if no
* section provider types match the specified program.
*/
- public static DWARFSectionProvider createSectionProviderFor(Program program) {
- for (Function<Program, DWARFSectionProvider> factoryFunc : sectionProviderFactoryFuncs) {
- DWARFSectionProvider sp = factoryFunc.apply(program);
+ public static DWARFSectionProvider createSectionProviderFor(Program program,
+ TaskMonitor monitor) {
+ for (BiFunction<Program, TaskMonitor, DWARFSectionProvider> factoryFunc : sectionProviderFactoryFuncs) {
+ DWARFSectionProvider sp = factoryFunc.apply(program, monitor);
if (sp != null) {
try {
if (sp.hasSection(DWARFSectionNames.MINIMAL_DWARF_SECTIONS)) {
return sp;
}
+
+ // if normal sections were not found, look for compressed sections in the
+ // same provider
+ sp = new CompressedSectionProvider(sp);
+ if (sp.hasSection(DWARFSectionNames.MINIMAL_DWARF_SECTIONS)) {
+ return sp;
+ }
}
catch (Exception e) {
Msg.warn(DWARFSectionProviderFactory.class,
@@ -75,28 +87,4 @@ public class DWARFSectionProviderFactory {
return null;
}
- /**
- * Iterates through the statically registered {@link #sectionProviderFactoryFuncs factory funcs},
- * trying each factory method until one returns a {@link DWARFSectionProvider}
- * that can successfully retrieve the {@link DWARFSectionNames#MINIMAL_DWARF_SECTIONS minimal}
- * sections we need to do a DWARF import.
- * <p>
- * The resulting {@link DWARFSectionProvider} is {@link Closeable} and it is the caller's
- * responsibility to ensure that the object is closed when done.
- *
- * @param program Ghidra {@link Program}
- * @param monitor {@link TaskMonitor}
- * @return {@link DWARFSectionProvider} that should be closed by the caller or NULL if no
- * section provider types match the specified program.
- */
- public static DWARFSectionProvider createSectionProviderFor(Program program,
- TaskMonitor monitor) {
- DWARFSectionProvider result = createSectionProviderFor(program);
- if (result != null) {
- return result;
- }
- result = ExternalDebugFileSectionProvider.createSectionProviderFor(program, monitor);
- return result;
- }
-
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/ExternalDebugFileSectionProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/ExternalDebugFileSectionProvider.java
index 04a870f94c..0814c3023d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/ExternalDebugFileSectionProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/ExternalDebugFileSectionProvider.java
@@ -45,7 +45,7 @@ import ghidra.util.task.TaskMonitor;
public class ExternalDebugFileSectionProvider extends BaseSectionProvider {
public static final String PROGRAM_INFO_DWARF_EXTERNAL_DEBUG_FILE = "DWARF External Debug File";
- public static DWARFSectionProvider createSectionProviderFor(Program program,
+ public static DWARFSectionProvider createExternalSectionProviderFor(Program program,
TaskMonitor monitor) {
try {
ExternalDebugInfo extDebugInfo = ExternalDebugInfo.fromProgram(program);
@@ -123,7 +123,7 @@ public class ExternalDebugFileSectionProvider extends BaseSectionProvider {
}
/**
- * Returns the previouly saved value of the external debug file location from the program's
+ * Returns the previously saved value of the external debug file location from the program's
* metadata.
*
* @param program DWARF that previously was analyzed
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/NullSectionProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/NullSectionProvider.java
index 783d7cfebc..fe9df0206c 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/NullSectionProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf4/next/sectionprovider/NullSectionProvider.java
@@ -18,6 +18,7 @@ package ghidra.app.util.bin.format.dwarf4.next.sectionprovider;
import java.io.IOException;
import ghidra.app.util.bin.ByteProvider;
+import ghidra.util.task.TaskMonitor;
public class NullSectionProvider implements DWARFSectionProvider {
@@ -26,7 +27,8 @@ public class NullSectionProvider implements DWARFSectionProvider {
}
@Override
- public ByteProvider getSectionAsByteProvider(String sectionName) throws IOException {
+ public ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor)
+ throws IOException {
return ByteProvider.EMPTY_BYTEPROVIDER;
}