Package ghidra.program.model.pcode
Class PackedEncodeOverlay
java.lang.Object
ghidra.program.model.pcode.PackedEncode
ghidra.program.model.pcode.PatchPackedEncode
ghidra.program.model.pcode.PackedEncodeOverlay
- All Implemented Interfaces:
CachedEncoder
,Encoder
,PatchEncoder
Alter address space encoding for a specific overlay space.
Any space that matches the overlay space is encoded as the overlayed space.
This causes addresses in the overlay space to be converted into the underlying space.
-
Field Summary
Fields inherited from class ghidra.program.model.pcode.PackedEncode
outStream
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
writeSpace
(AttributeId attribId, AddressSpace spc) Write an address space reference into the encoding The address space is associated with the given AttributeId annotation and the current open element.void
writeSpaceId
(AttributeId attribId, long spaceId) Write a given raw spaceid (as returned by AddressSpace.getSpaceID()) as an attribute.Methods inherited from class ghidra.program.model.pcode.PatchPackedEncode
clear, isEmpty, patchIntegerAttribute, size, writeTo
Methods inherited from class ghidra.program.model.pcode.PackedEncode
closeElement, getOutputStream, openElement, writeBool, writeHeader, writeInteger, writeOpcode, writeSignedInteger, writeSpace, writeString, writeStringIndexed, writeUnsignedInteger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.program.model.pcode.Encoder
closeElement, openElement, writeBool, writeOpcode, writeSignedInteger, writeSpace, writeString, writeStringIndexed, writeUnsignedInteger
-
Constructor Details
-
PackedEncodeOverlay
- Throws:
AddressFormatException
-
-
Method Details
-
setOverlay
- Throws:
AddressFormatException
-
writeSpace
Description copied from interface:Encoder
Write an address space reference into the encoding The address space is associated with the given AttributeId annotation and the current open element.- Specified by:
writeSpace
in interfaceEncoder
- Overrides:
writeSpace
in classPackedEncode
- Parameters:
attribId
- is the given AttributeId annotationspc
- is the address space to encode- Throws:
IOException
- for errors in the underlying stream
-
writeSpaceId
Description copied from interface:PatchEncoder
Write a given raw spaceid (as returned by AddressSpace.getSpaceID()) as an attribute. The effect is the same as if writeSpace() was called with the AddressSpace matching the spaceid, i.e. the decoder will read this as just space attribute.- Specified by:
writeSpaceId
in interfacePatchEncoder
- Overrides:
writeSpaceId
in classPatchPackedEncode
- Parameters:
attribId
- is the attributespaceId
- is the given spaceid- Throws:
IOException
- for problems writing to the stream
-