GP3903 corrected address input for add memory block dialog to include

all overlay spaces.
This commit is contained in:
ghidra1
2023-11-09 18:01:32 -05:00
parent f7db015f61
commit 07f0f57cab
2 changed files with 5 additions and 6 deletions

View File

@@ -544,8 +544,7 @@ class AddBlockDialog extends DialogComponentProvider implements ChangeListener {
addrField = new AddressInput();
addrField.setName("Start Addr");
addrFactory = model.getProgram().getAddressFactory();
addrField.setAddressFactory(addrFactory,
AddressInput.INCLUDE_OTHER_AND_LOADED_MEMORY_SPACES);
addrField.setAddressFactory(addrFactory, AddressInput.INCLUDE_ALL_MEMORY_SPACES);
addrField.addChangeListener(ev -> addrChanged());
return addrField;
}

View File

@@ -183,12 +183,12 @@ public class AddressInput extends JPanel implements FocusableEditor {
};
/**
* Address Space predicate which include all loaded memory spaces plus the
* {@link AddressSpace#OTHER_SPACE}. See {@link AddressSpace#isLoadedMemorySpace()}.
* Address Space predicate which includes all memory spaces, including the
* {@link AddressSpace#OTHER_SPACE} and all overlay spaces.
* Intended for use with {@link #setAddressFactory(AddressFactory, Predicate)}.
*/
public final static Predicate<AddressSpace> INCLUDE_OTHER_AND_LOADED_MEMORY_SPACES = (s) -> {
return s.isLoadedMemorySpace() || s.equals(AddressSpace.OTHER_SPACE);
public final static Predicate<AddressSpace> INCLUDE_ALL_MEMORY_SPACES = (s) -> {
return s.isMemorySpace();
};
/**