GP-1142: fix for missing 'info proc mappings'

This commit is contained in:
d-millar 2021-07-19 11:57:05 -04:00
parent 928bc5508a
commit 91fa4d12c9

View file

@ -65,6 +65,14 @@ public class GdbModelTargetProcessMemory
protected void updateUsingMappings(Map<BigInteger, GdbMemoryMapping> byStart) {
List<GdbModelTargetMemoryRegion> regions;
synchronized (this) {
if (byStart.isEmpty()) {
AddressSet addressSet = impl.getAddressFactory().getAddressSet();
BigInteger start = addressSet.getMinAddress().getOffsetAsBigInteger();
BigInteger end = addressSet.getMaxAddress().getOffsetAsBigInteger();
GdbMemoryMapping mem = new GdbMemoryMapping(start, end,
end.subtract(start), start.subtract(start), "default");
byStart.put(start, mem);
}
regions =
byStart.values().stream().map(this::getTargetRegion).collect(Collectors.toList());
}