GT-2845: Storing original program bytes in the program database.

This commit is contained in:
ghidravore 2019-05-06 12:44:51 -04:00 committed by Ryan Kurtz
parent d95fd43762
commit 0792417979
73 changed files with 7129 additions and 2575 deletions

View file

@ -15,9 +15,12 @@
*/
package ghidra.feature.vt.db;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import ghidra.framework.store.LockException;
import ghidra.program.database.mem.FileBytes;
import ghidra.program.model.address.*;
import ghidra.program.model.listing.Program;
import ghidra.program.model.mem.*;
@ -37,8 +40,8 @@ public class MemoryTestDummy extends AddressSet implements Memory {
}
@Override
public MemoryBlock convertToUninitialized(MemoryBlock initializedBlock) throws LockException,
MemoryBlockException, NotFoundException {
public MemoryBlock convertToUninitialized(MemoryBlock initializedBlock)
throws LockException, MemoryBlockException, NotFoundException {
return null;
}
@ -62,17 +65,17 @@ public class MemoryTestDummy extends AddressSet implements Memory {
@Override
public MemoryBlock createInitializedBlock(String name, Address start, InputStream is,
long length, TaskMonitor monitor, boolean overlay) throws LockException,
MemoryConflictException, AddressOverflowException, CancelledException,
DuplicateNameException {
long length, TaskMonitor monitor, boolean overlay)
throws LockException, MemoryConflictException, AddressOverflowException,
CancelledException, DuplicateNameException {
return null;
}
@Override
public MemoryBlock createInitializedBlock(String name, Address start, long size,
byte initialValue, TaskMonitor monitor, boolean overlay) throws LockException,
DuplicateNameException, MemoryConflictException, AddressOverflowException,
CancelledException {
byte initialValue, TaskMonitor monitor, boolean overlay)
throws LockException, DuplicateNameException, MemoryConflictException,
AddressOverflowException, CancelledException {
return null;
}
@ -248,8 +251,8 @@ public class MemoryTestDummy extends AddressSet implements Memory {
}
@Override
public MemoryBlock join(MemoryBlock blockOne, MemoryBlock blockTwo) throws LockException,
MemoryBlockException, NotFoundException {
public MemoryBlock join(MemoryBlock blockOne, MemoryBlock blockTwo)
throws LockException, MemoryBlockException, NotFoundException {
return null;
}
@ -312,14 +315,37 @@ public class MemoryTestDummy extends AddressSet implements Memory {
}
@Override
public void setShort(Address addr, short value, boolean bigEndian) throws MemoryAccessException {
public void setShort(Address addr, short value, boolean bigEndian)
throws MemoryAccessException {
// no op
}
@Override
public void split(MemoryBlock block, Address addr) throws MemoryBlockException, LockException,
NotFoundException {
public void split(MemoryBlock block, Address addr)
throws MemoryBlockException, LockException, NotFoundException {
// no op
}
@Override
public FileBytes createFileBytes(String filename, long offset, long size, InputStream is)
throws IOException {
throw new UnsupportedOperationException();
}
@Override
public List<FileBytes> getAllFileBytes() {
throw new UnsupportedOperationException();
}
@Override
public boolean deleteFileBytes(FileBytes descriptor) {
throw new UnsupportedOperationException();
}
@Override
public MemoryBlock createInitializedBlock(String name, Address start, FileBytes fileBytes,
long offset, long size, boolean overlay) throws LockException, DuplicateNameException,
MemoryConflictException, AddressOverflowException {
throw new UnsupportedOperationException();
}
}