mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-4125 Added memory block artificial attribute flag
This commit is contained in:
parent
ddf4d15327
commit
ae475f743b
48 changed files with 734 additions and 465 deletions
|
@ -18,6 +18,8 @@ package ghidra.trace.database.program;
|
|||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
|
||||
import javax.help.UnsupportedOperationException;
|
||||
|
||||
import ghidra.framework.store.LockException;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.database.memory.DBTraceMemorySpace;
|
||||
|
@ -57,7 +59,7 @@ public class DBTraceProgramViewMemoryRegionBlock extends AbstractDBTraceProgramV
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getPermissions() {
|
||||
public int getFlags() {
|
||||
int bits = 0;
|
||||
for (TraceMemoryFlag flag : region.getFlags()) {
|
||||
bits |= flag.getBits();
|
||||
|
@ -145,4 +147,15 @@ public class DBTraceProgramViewMemoryRegionBlock extends AbstractDBTraceProgramV
|
|||
public void setVolatile(boolean v) {
|
||||
region.setVolatile(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isArtificial() {
|
||||
// By definition, any region present on target is non-artificial
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setArtificial(boolean a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DBTraceProgramViewMemorySpaceBlock extends AbstractDBTraceProgramVi
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getPermissions() {
|
||||
public int getFlags() {
|
||||
return MemoryBlock.READ | MemoryBlock.WRITE | MemoryBlock.EXECUTE;
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,16 @@ public class DBTraceProgramViewMemorySpaceBlock extends AbstractDBTraceProgramVi
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isArtificial() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setArtificial(boolean a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSourceName() {
|
||||
return "Trace"; // TODO: What does this method actually do?
|
||||
|
|
|
@ -116,7 +116,7 @@ public class DBTraceProgramViewRegisterMemoryBlock implements MemoryBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getPermissions() {
|
||||
public int getFlags() {
|
||||
return MemoryBlock.READ | MemoryBlock.WRITE;
|
||||
}
|
||||
|
||||
|
@ -220,6 +220,16 @@ public class DBTraceProgramViewRegisterMemoryBlock implements MemoryBlock {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isArtificial() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setArtificial(boolean a) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSourceName() {
|
||||
return "Trace"; // TODO: What does this method actually do?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue