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.
This commit is contained in:
2026-06-06 17:25:00 +01:00
parent c90ee285cc
commit 4d30949a4d
13 changed files with 485 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
#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;
}