mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-4508 Corrected program context mutli-user merge issue for overlays
This commit is contained in:
parent
e9e4ee48ce
commit
13821930da
4 changed files with 147 additions and 73 deletions
|
@ -22,7 +22,6 @@ import ghidra.program.database.register.InMemoryRangeMapAdapter;
|
|||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.lang.*;
|
||||
import ghidra.program.model.listing.ContextChangeException;
|
||||
import ghidra.util.exception.AssertException;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
|
@ -249,7 +248,8 @@ abstract public class AbstractStoredProgramContext extends AbstractProgramContex
|
|||
public void remove(Address start, Address end, Register register)
|
||||
throws ContextChangeException {
|
||||
if (start.getAddressSpace() != end.getAddressSpace()) {
|
||||
throw new AssertException("start and end address must be in the same address space");
|
||||
throw new IllegalArgumentException(
|
||||
"start and end address must refer to the same address space instance");
|
||||
}
|
||||
RegisterValueStore values = registerValueMap.get(register.getBaseRegister());
|
||||
if (values != null) {
|
||||
|
@ -260,7 +260,7 @@ abstract public class AbstractStoredProgramContext extends AbstractProgramContex
|
|||
|
||||
// public void removeDefault(Address start, Address end, Register register) {
|
||||
// if (start.getAddressSpace() != end.getAddressSpace()) {
|
||||
// throw new AssertException("start and end address must be in the same address space");
|
||||
// throw new IllegalArgumentException("start and end address must refer to the same address space instance");
|
||||
// }
|
||||
// invalidateCache();
|
||||
// RegisterValueStore values = defaultRegisterValueMap.get(register.getBaseRegister());
|
||||
|
@ -273,7 +273,8 @@ abstract public class AbstractStoredProgramContext extends AbstractProgramContex
|
|||
public void setValue(Register register, Address start, Address end, BigInteger value)
|
||||
throws ContextChangeException {
|
||||
if (start.getAddressSpace() != end.getAddressSpace()) {
|
||||
throw new AssertException("start and end address must be in the same address space");
|
||||
throw new IllegalArgumentException(
|
||||
"start and end address must refer to the same address space instance");
|
||||
}
|
||||
if (value == null) {
|
||||
remove(start, end, register);
|
||||
|
@ -285,7 +286,8 @@ abstract public class AbstractStoredProgramContext extends AbstractProgramContex
|
|||
@Override
|
||||
public void setDefaultValue(RegisterValue registerValue, Address start, Address end) {
|
||||
if (start.getAddressSpace() != end.getAddressSpace()) {
|
||||
throw new AssertException("start and end address must be in the same address space");
|
||||
throw new IllegalArgumentException(
|
||||
"start and end address must refer to the same address space instance");
|
||||
}
|
||||
Register baseRegister = registerValue.getRegister().getBaseRegister();
|
||||
RegisterValueStore store = defaultRegisterValueMap.get(baseRegister);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue