mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-0 DB exception improvements/cleanup
This commit is contained in:
parent
4b50ba28a9
commit
a9f778ddb0
32 changed files with 324 additions and 215 deletions
|
@ -125,7 +125,8 @@ public class DBTraceMemoryBufferEntry extends DBAnnotatedObject {
|
|||
return true;
|
||||
}
|
||||
|
||||
public int setBytes(ByteBuffer buf, int dstOffset, int len, int blockNum) throws IOException {
|
||||
public int setBytes(ByteBuffer buf, int dstOffset, int len, int blockNum)
|
||||
throws IndexOutOfBoundsException, IOException {
|
||||
assert isSane(dstOffset, len, blockNum);
|
||||
if (compressed) {
|
||||
decompress();
|
||||
|
@ -136,7 +137,8 @@ public class DBTraceMemoryBufferEntry extends DBAnnotatedObject {
|
|||
return len;
|
||||
}
|
||||
|
||||
public int getBytes(ByteBuffer buf, int srcOffset, int len, int blockNum) throws IOException {
|
||||
public int getBytes(ByteBuffer buf, int srcOffset, int len, int blockNum)
|
||||
throws IndexOutOfBoundsException, IOException {
|
||||
assert isSane(srcOffset, len, blockNum);
|
||||
if (compressed) {
|
||||
return doGetCompressedBytes(buf, srcOffset, len, blockNum);
|
||||
|
@ -161,7 +163,8 @@ public class DBTraceMemoryBufferEntry extends DBAnnotatedObject {
|
|||
}
|
||||
}
|
||||
|
||||
protected void doGetBlock(int blockNum, byte[] data) throws IOException {
|
||||
protected void doGetBlock(int blockNum, byte[] data)
|
||||
throws IndexOutOfBoundsException, IOException {
|
||||
assert isInUse(blockNum);
|
||||
if (compressed) {
|
||||
doGetCompressedBlock(blockNum, data);
|
||||
|
@ -180,7 +183,7 @@ public class DBTraceMemoryBufferEntry extends DBAnnotatedObject {
|
|||
}
|
||||
|
||||
public void copyFrom(int dstBlockNum, DBTraceMemoryBufferEntry srcBuf, int srcBlockNum)
|
||||
throws IOException {
|
||||
throws IndexOutOfBoundsException, IOException {
|
||||
assert isInUse(dstBlockNum);
|
||||
if (compressed) {
|
||||
decompress();
|
||||
|
@ -190,7 +193,8 @@ public class DBTraceMemoryBufferEntry extends DBAnnotatedObject {
|
|||
buffer.put(dstBlockNum << DBTraceMemorySpace.BLOCK_SHIFT, data);
|
||||
}
|
||||
|
||||
public int cmpBytes(ByteBuffer buf, int blkOffset, int len, int blockNum) throws IOException {
|
||||
public int cmpBytes(ByteBuffer buf, int blkOffset, int len, int blockNum)
|
||||
throws IndexOutOfBoundsException, IOException {
|
||||
assert isSane(blkOffset, len, blockNum);
|
||||
if (compressed) {
|
||||
return doCmpCompressedBytes(buf, blkOffset, len, blockNum);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue