Zero-allocation packet payload recognizer.
More...
#include <gdb_packet_recognizer.hpp>
|
| static constexpr packet_type | recognize (string_view payload) noexcept |
| | Identifies the high-level packet_type from a raw GDB packet payload.
|
| |
Zero-allocation packet payload recognizer.
◆ recognize()
| static constexpr packet_type microfmt::gdb::packet_recognizer::recognize |
( |
string_view |
payload | ) |
|
|
inlinestaticconstexprnoexcept |
Identifies the high-level packet_type from a raw GDB packet payload.
- Parameters
-
| payload | Unescaped packet payload string (without '$' and '#XX'). |
- Returns
- Resolved packet_type, or unknown if unrecognized.
◆ k_count_multichar
| constexpr size_t microfmt::gdb::packet_recognizer::k_count_multichar |
|
staticconstexpr |
Initial value:= []() -> size_t {
size_t count = 0;
#define __INSPECTOR_GDB_PACKET_TYPE_X(name, str)
return count;
}()
◆ k_first_byte_table
| constexpr auto microfmt::gdb::packet_recognizer::k_first_byte_table |
|
staticconstexpr |
Initial value:= []() {
reloco::array<packet_type, 128> table{};
for (size_t i = 0; i < 128; ++i) {
table[i] = packet_type::unknown;
}
#define __INSPECTOR_GDB_PACKET_TYPE_X(name, str)
return table;
}()
◆ k_multi_char_table
| constexpr auto microfmt::gdb::packet_recognizer::k_multi_char_table |
|
staticconstexpr |
Initial value:= []() {
reloco::array<packet_entry, k_count_multichar> sub{};
size_t idx = 0;
#define __INSPECTOR_GDB_PACKET_TYPE_X(name, str)
return sub;
}()
The documentation for this class was generated from the following file: