Package ghidra.pcode.utils
Class SlaFormat
java.lang.Object
ghidra.pcode.utils.SlaFormat
Encoding values for the .sla file format
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final AttributeId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final ElementId
static final int
FORMAT_VERSION will be incremented whenever the format of the .sla files change.static final int
Absolute limit on the number of bytes in a .sla file -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PackedDecode
buildDecoder
(ResourceFile sleighFile) Build the decoder for decompressing and decoding the .sla file (as a stream).static PackedEncode
buildEncoder
(ResourceFile sleighFile) Build the encoder for compressing and encoding a .sla file (as a stream).static boolean
isSlaFormat
(InputStream stream) Try to read the header bytes of the .sla format from the given stream.static void
writeSlaHeader
(OutputStream stream) Write a .sla file header,including the format version number to the given stream.
-
Field Details
-
FORMAT_VERSION
public static final int FORMAT_VERSIONFORMAT_VERSION will be incremented whenever the format of the .sla files change.Version 4: Compressed and packed file format Version 3: January 2021: added source file information for each constructor.
Version 2: April 2019: Changed numbering of Overlay spaces.
Version 1: Initial version.- See Also:
-
MAX_FILE_SIZE
public static final int MAX_FILE_SIZEAbsolute limit on the number of bytes in a .sla file- See Also:
-
ATTRIB_VAL
-
ATTRIB_ID
-
ATTRIB_SPACE
-
ATTRIB_S
-
ATTRIB_OFF
-
ATTRIB_CODE
-
ATTRIB_MASK
-
ATTRIB_INDEX
-
ATTRIB_NONZERO
-
ATTRIB_PIECE
-
ATTRIB_NAME
-
ATTRIB_SCOPE
-
ATTRIB_STARTBIT
-
ATTRIB_SIZE
-
ATTRIB_TABLE
-
ATTRIB_CT
-
ATTRIB_MINLEN
-
ATTRIB_BASE
-
ATTRIB_NUMBER
-
ATTRIB_CONTEXT
-
ATTRIB_PARENT
-
ATTRIB_SUBSYM
-
ATTRIB_LINE
-
ATTRIB_SOURCE
-
ATTRIB_LENGTH
-
ATTRIB_FIRST
-
ATTRIB_PLUS
-
ATTRIB_SHIFT
-
ATTRIB_ENDBIT
-
ATTRIB_SIGNBIT
-
ATTRIB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_SYM
-
ELEM_CONTEXT_SYM_HEAD
-
ELEM_END_SYM
-
ELEM_END_SYM_HEAD
-
ELEM_SPACE_OTHER
-
ELEM_SPACE_UNIQUE
-
ELEM_AND_EXP
-
ELEM_DIV_EXP
-
ELEM_LSHIFT_EXP
-
ELEM_MINUS_EXP
-
ELEM_MULT_EXP
-
ELEM_NOT_EXP
-
ELEM_OR_EXP
-
ELEM_PLUS_EXP
-
ELEM_RSHIFT_EXP
-
ELEM_SUB_EXP
-
ELEM_XOR_EXP
-
ELEM_INTB
-
ELEM_END_EXP
-
ELEM_NEXT2_EXP
-
ELEM_START_EXP
-
ELEM_EPSILON_SYM
-
ELEM_EPSILON_SYM_HEAD
-
ELEM_NAME_SYM
-
ELEM_NAME_SYM_HEAD
-
ELEM_NAMETAB
-
ELEM_NEXT2_SYM
-
ELEM_NEXT2_SYM_HEAD
-
ELEM_START_SYM
-
ELEM_START_SYM_HEAD
-
ELEM_SUBTABLE_SYM
-
ELEM_SUBTABLE_SYM_HEAD
-
ELEM_VALUEMAP_SYM
-
ELEM_VALUEMAP_SYM_HEAD
-
ELEM_VALUETAB
-
ELEM_VARLIST_SYM
-
ELEM_VARLIST_SYM_HEAD
-
ELEM_OR_PAT
-
ELEM_COMMIT
-
ELEM_CONST_START
-
ELEM_CONST_NEXT
-
ELEM_CONST_NEXT2
-
ELEM_CONST_CURSPACE
-
ELEM_CONST_CURSPACE_SIZE
-
ELEM_CONST_FLOWREF
-
ELEM_CONST_FLOWREF_SIZE
-
ELEM_CONST_FLOWDEST
-
ELEM_CONST_FLOWDEST_SIZE
-
-
Constructor Details
-
SlaFormat
public SlaFormat()
-
-
Method Details
-
isSlaFormat
Try to read the header bytes of the .sla format from the given stream. If the header bytes and the version byte match, \b true is returned, and the stream can be passed to the decoder.- Parameters:
stream
- is the given stream- Returns:
- true if the .sla header bytes are found
- Throws:
IOException
- for any errors reading from the stream
-
writeSlaHeader
Write a .sla file header,including the format version number to the given stream.- Parameters:
stream
- is the given stream- Throws:
IOException
- for problems writing to the stream
-
buildEncoder
Build the encoder for compressing and encoding a .sla file (as a stream). The given file is opened and a header is immediately written. The returned encoder is ready immediately to receive the .sla elements and attributes.- Parameters:
sleighFile
- is the .sla file (to be created)- Returns:
- the encoder
- Throws:
IOException
- for any problems opening or writing to the file
-
buildDecoder
Build the decoder for decompressing and decoding the .sla file (as a stream). The given file is opened and the header bytes are checked. The returned decoder is immediately ready to read.- Parameters:
sleighFile
- is the given .sla file- Returns:
- the decoder
- Throws:
IOException
- if the header is invalid or there are problems reading the file
-