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
+29
View File
@@ -0,0 +1,29 @@
#include <magenta/debug/event.h>
const char *mxdbg_event_type_get_description(enum mxdbg_event_type type)
{
switch (type) {
case MXDBG_EVENT_TASK_CREATED:
return "task-create";
case MXDBG_EVENT_TASK_STARTED:
return "task-start";
case MXDBG_EVENT_TASK_STOPPED:
return "task-stop";
case MXDBG_EVENT_TASK_DESTROYED:
return "task-destroy";
case MXDBG_EVENT_THREAD_CREATED:
return "thread-create";
case MXDBG_EVENT_THREAD_STARTED:
return "thread-start";
case MXDBG_EVENT_THREAD_STOPPED:
return "thread-stop";
case MXDBG_EVENT_THREAD_DESTROYED:
return "thread-destroy";
case MXDBG_EVENT_THREAD_FAULT:
return "thread-fault";
case MXDBG_EVENT_PANIC:
return "panic";
default:
return "<unknown>";
}
}