Merge remote-tracking branch 'origin/GP-0_dev747368_more_fixes_dwarf_external_program_addresses' into Ghidra_12.0

This commit is contained in:
Ryan Kurtz
2025-11-24 13:41:29 -05:00
2 changed files with 8 additions and 1 deletions

View File

@@ -159,6 +159,10 @@ public class MemoryByteProvider implements ByteProvider {
this.isEmtpy = maxAddress == null;
}
public Memory getMemory() {
return memory;
}
private Address getAddress(long index) throws IOException {
if (index == 0) {
return baseAddress;

View File

@@ -573,7 +573,10 @@ public class DWARFProgram implements Closeable {
}
ByteProvider bp = br.getByteProvider();
if (bp instanceof MemoryByteProvider mbp && !mbp.isEmpty()) {
if (program.getRelocationTable().getRelocations(mbp.getAddressSet()).hasNext()) {
Program providerProgram = mbp.getMemory().getProgram();
if (providerProgram.getRelocationTable()
.getRelocations(mbp.getAddressSet())
.hasNext()) {
return true;
}
}