GP-884: Improved location label (subheader) in dynamic listing

This commit is contained in:
Dan 2021-04-27 15:36:23 -04:00
parent 983b78333e
commit c70496680d
5 changed files with 74 additions and 20 deletions

View file

@ -90,6 +90,7 @@ public class DbgModelTargetMemoryRegionImpl extends DbgModelTargetObjectImpl
isExec = region.isExec();
this.changeAttributes(List.of(), List.of(), Map.of( //
DISPLAY_ATTRIBUTE_NAME, computeDisplay(region), //
MEMORY_ATTRIBUTE_NAME, memory, //
RANGE_ATTRIBUTE_NAME, doGetRange(section), //
READABLE_ATTRIBUTE_NAME, isReadable(), //
@ -110,6 +111,10 @@ public class DbgModelTargetMemoryRegionImpl extends DbgModelTargetObjectImpl
), "Initialized");
}
protected String computeDisplay(DbgModuleMemory region) {
return region.getType() + " " + getName(); // NB. Name will contain []s
}
protected AddressRange doGetRange(DbgModuleMemory s) {
AddressSpace addressSpace = getModel().getAddressSpace("ram");
Address min = addressSpace.getAddress(s.getVmaStart());