B2R2.FrontEnd.BinLifter Namespace
Contains types and functions for working with parsing and lifting binary code. Every parser and lifter in B2R2 should open this namespace at least once.
| Type/Module | Description |
|
Represents a smallest chunk of an assembly statement. Specifically, we divide an assembly statement into a series of AsmWords, each of which represents a chunk of the assembly statement. For example, the assembly statement "mov eax, 1" can be divided into five AsmWords: "mov", " ", "eax", ", ", and "1". The first AsmWord is a mnemonic, the second is a space character, the third is a variable (register), the fourth is a space character, and the fifth is a value (immediate). |
|
|
Represents a disassembly builder that accumulates |
|
|
Represents a kind of a assembly word. |
|
|
Provides a function to instantiate a binary reader that implements |
|
|
Represents a read-only span for byte arrays. This is a type alias for
|
|
|
Represents a lastly used opcode, which can be lazily remembered by an emulator to compute condition flags. |
|
|
Provides a function that performs a constant folding optimization for the lifted IR statements. This function assumes that the statements are localized, i.e., they represent a basic block. |
|
|
Provides a function that performs dead code elimination for the lifted IR statements. This function assumes that the statements are localized, i.e., they represent a basic block. |
|
|
Represents the disassembly syntax. |
|
|
Provides an interface for reading byte sequences from a byte array (or a ByteSpan). The endianness is determined by the implementation of the interface. |
|
|
Provides an interface for producing disassembly, which is used to accumulate disassembly strings and to return them as a single string or an array of AsmWords when requested. |
|
|
Represents a single machine instruction in a platform-independent manner. It provides useful methods for accessing useful information about the instruction. |
|
|
Provides an interface for parsing binary instructions. |
|
|
Provides an interface for optimizing a block of IR statements. |
|
|
Provides a common functionality for building LowUIR statements from instructions. Some CPU architectures may extend this interface to provide additional functionalities, although most architectures will simply implement the default implementation as is. |
|
|
Represents an interface for resolving symbolic names in a binary. |
|
|
Raised when an invalid opcode has been encountered during parsing/lifting. |
|
|
Raised when an invalid operand has been encountered during parsing/lifting. |
|
|
Raised when an invalid operand type has been encountered during parsing/lifting. |
|
|
Raised when an invalid register has been encountered during parsing/lifting. |
|
|
Provides a platform-agnostic interface for accessing register information. |
|
|
Provides several utility functions for lifting binary code to IR. |
|
|
Represents an intra-block local IR optimizer. |
|
|
Provides a stream for building LowUIR statements. This will accumulate LowUIR statements and return them as an array when requested. It also maintains internal counters for temporary variables and labels to avoid name collisions. |
|
|
Raised when the IR is not implemented yet. |
|
|
Raised when parsing binary code failed. This exception indicates a non-recoverable parsing failure. |
|
|
Provides several utility functions to parse binary code. |
|
|
Represents a disassembly builder that simply accumulates strings without any type annotation. |
B2R2