ByteInterval
A ByteInterval represents a named section of a binary.
The corresponding Protobuf message type is ByteInterval
.
Guaranteed Properties
- A ByteInterval is a Node.
- Each ByteInterval object must have the following information, and the API must provide functionality for getting and setting each.
- blocks (as a collection of ByteBlock objects, in offset order)
- symbolic_expressions (as a collection of SymbolicExpression objects, in offset order)
- contents (as a byte array)
- size
- address (Must be either optional or nullable. It is not valid to have a sentinel value in the range of a 64-bit integer as an indication of nullness.)
- A ByteInterval must provide the following functionality for its blocks.
- Insert a ByteBlock at a specified offset.
- Remove an existing ByteBlock.
- Retrieve all ByteBlock objects at a specified offset.
- Iterate over all ByteBlock objects.
- Find all CodeBlock objects that intersect a given address or range of addresses.
- Find all CodeBlock objects that start at a given address or range of addresses. This operation must complete in O(m + log n) time, where m is the size of the returned set and n is the number of ByteBlock objects in blocks.
- Find all DataBlock objects that intersect a given address or range of addresses.
- Find all DataBlock objects that start at a given address or range of addresses. This operation must complete in O(m + log n) time, where m is the size of the returned set and n is the number of ByteBlock objects in blocks.
- A ByteInterval must provide the following functionality for its symbolic_expressions.
- Insert a SymbolicExpression at a specified offset.
- Remove an existing SymbolicExpression.
- Retrieve all SymbolicExpression objects at a specified offset.
- Iterate over all SymbolicExpression objects.
- Find all SymbolicExpression objects that start at a given address or range of addresses. This operation must complete in O(log n) time, where n is the number of SymbolicExpression objects in symbolic_expressions. (There is no corresponding address intersection requirement: SymbolicExpressions have no size.)
- The contents have the following requirements.
- The size of contents must be less than or equal to the size of the ByteInterval.
- If the size of a ByteInterval is changed to a value that is less than the size of its contents, its contents must be truncated.
- Each ByteInterval must belong to either zero (0) or one (1) Section objects. The owning Section must be stored as a reference.
- This reference may be null, in which case the ByteInterval is freestanding and does not belong to any Section.
API Implementations
The guaranteed functionality is provided as follows.
ByteInterval Classes
blocks
Get and Set
ByteBlock operations
Find CodeBlock Objects...
[*] Address range checking is not yet implemented for Common Lisp at-address
Find DataBlock Objects...
[*] Address range checking is not yet implemented for Common Lisp at-address
symbolic_expressions
Get and Set
Find SymbolicExpression Objects...
[*] Address range checking is not yet implemented for Common Lisp at-address
Other Required SymbolicExpression Operations
contents
Get and Set
size
Get and Set
address
Get and Set
Associated Section
Links