Files
wash 4d30949a4d meta: add debugging library
the debug library can be used by both server (the kernel) and client
(the debugger) applications. the library implements the protocol
that is used for communication between the kernel and debugger, as
well as handling for any requests supported by the protocol.
2026-06-06 17:25:00 +01:00

21 lines
478 B
C

#include <magenta/debug/packet.h>
#include <magenta/debug/util.h>
void mxdbg_packet_init(
struct mxdbg_packet *packet,
size_t size,
enum mxdbg_packet_type type,
enum mxdbg_packet_flags flags)
{
memset(packet, 0x0, sizeof *packet);
packet->pkt_magic = MXDBG_PACKET_MAGIC;
packet->pkt_length = size;
packet->pkt_type = type;
packet->pkt_flags = flags;
}
bool mxdbg_packet_validate(const struct mxdbg_packet *packet)
{
return packet->pkt_magic == MXDBG_PACKET_MAGIC;
}