B2R2 Namespace
B2R2 is the top-level namespace, representing the whole project.
| Type/Module | Description |
|
Provides a useful set of functions for handling Addr values. |
|
|
Represents an address in binary code. Technically this is just an alias of
|
|
|
Provides a useful set of functions for handling AddrRange values. |
|
|
Represents a range of address values that are greater than or equal to the
|
|
|
Represents an agent that processes messages asynchronously using the TPL Dataflow. See also AgentReplyChannel. |
|
|
Represents a reply channel for an agent (Agent). The agent will receive a message synchronously from the reply channel. |
|
|
Represents CPU architecture types that are supported by B2R2. |
|
|
Provides functions for dealing with |
|
|
Represents a bit vector, which is a sequence of bits. This type internally
uses two different representations to represent a bit vector depending on
its size. The numeric value of the bit vector is stored in little-endian
order. For those with less than or equal to 64 bits, it uses |
|
|
Provides functions for handling a |
|
|
Provides several useful functions to deal with byte arrays (i.e., ByteArray). |
|
|
Represents an array of bytes, often used to read raw binary data. This is
just an alias for |
|
|
Provides functions to work with BytePattern. It includes functions to match a byte array or a span against a BytePattern. |
|
|
Represents a pattern of bytes that can be used to match a byte array. A
BytePattern is an array of ByteValue, where each ByteValue (ByteValue) can be either AnyByte (which matches any byte) or
OneByte (which matches a specific byte value).
|
|
|
Represents a single byte value in a BytePattern. It can be either AnyByte, which matches any byte, or OneByte, which matches a specific byte value. |
|
|
Represents call site information of an abstract vertex in a control flow graph. Typically, there is a single concrete caller vertex that calls an abstract vertex. But in some cases, such as Continuation-Passing Style (CPS) patterns found in EVM binaries, an abstract vertex can have a chain of callers. |
|
|
Represents the kind of CIL code: only CIL, CIL for x86, or CIL for x64. |
|
|
Provides functions for working with Color values. |
|
|
Represents colors to print out in the console. When printing to a file, colors are ignored. |
|
|
Represents a string that can be printed out in the console with colors. A colored string is a list of colored segments, each of which represents a string with a specific color. |
|
|
Provides functions to work with Endian. |
|
|
Represents the endianness used in a binary. |
|
|
Provides functions to work with ErrorCase. |
|
|
Represents common error cases found in B2R2. |
|
|
Provides helper functions to construct hexadecimal strings from integers. Each string is prefixed with "0x", lowercase, and not zero-padded. Signed values are formatted as their two's complement bit pattern. |
|
|
Interface for receiving agent messages. |
|
|
Raised when an invalid AddrRange is constructed, i.e., when the min address is greater than the max address. |
|
|
Raised when an invalid Endian value is used. |
|
|
Raised when an invalid ISA is given as a parameter. |
|
|
Raised when an invalid RegType is encountered. |
|
|
Raised when an invalid WordSize is encountered. |
|
|
Provides methods to retrieve register names in a platform-agnostic manner. |
|
|
Provides active patterns for matching against specific ISAs. |
|
|
Represents the Instruction Set Architecture (ISA). |
|
|
Provides functions for encoding/decoding LEB128 integers. LEB128 is a variable-length encoding scheme that is designed to compactly represent integers. |
|
|
Provides functions to convert Linux syscall numbers to their corresponding syscall types and vice versa. |
|
|
Represents Linux syscalls. |
|
|
Provides convenient functions for logging. |
|
|
Provides B2R2 project metadata. |
|
|
Provides functions to work with OS types. |
|
|
Represents the target operating system type that the binary is compiled for. |
|
|
Represents an output string generated from rear-end applications. |
|
|
Represents a specific location in a lifted program. We represent this as a three-tuple: (address of the instruction, index of the IR stmt for the instruction, call site information). The third element (call site) is optional and only meaningful for abstract vertices. |
|
|
Represents the Python version. |
|
|
Raised when there are overlapping intervals from the interval tree. |
|
|
Provides a function to create a RegisterID. Although it is essentially an integer, we internally use a "unit of measure" to represent it, meaning that one needs to go through this module in order to create a new ID. |
|
|
Represents a platform-independent identifier for a register. |
|
|
Provides several helper functions to deal with RegType. |
|
|
Represents a register type in terms of its bit width. We use a unit of
measure to represent the bit width of a register. For example, a 32-bit
register is represented as |
|
|
Raised when two BitVectors have incompatible types (different bit lengths) in a binary operation. |
|
|
Provides useful functions for handling |
|
|
Provides a set of terminating functions, which are used to terminate the program when a non-recoverable error is encountered. |
|
|
Raised when unhandled syscall is encountered. |
|
|
Raised when unknown OS type is detected. |
|
|
Provides helper functions for handling the WordSize type. |
|
|
Represents the word size of a CPU. The word size is the number of bits that the CPU can naturally process in a single operation. |
B2R2