dmnt: add attach support to gdbstub

This commit is contained in:
Michael Scire authored and SciresM committed 2021-09-11 19:41:47 -07:00
1 parent 649a0052d0
commit 9f1f0c7cbd
3 files changed
+507 -19

No files matched your search

@@ -25,6 +25,7 @@ namespace ams::dmnt {
constexpr size_t ServerThreadStackSize = util::AlignUp(4 * GdbPacketBufferSize + os::MemoryPageSize, os::ThreadStackAlignment);
alignas(os::ThreadStackAlignment) constinit u8 g_server_thread_stack[ServerThreadStackSize];
alignas(os::ThreadStackAlignment) constinit u8 g_events_thread_stack[16_KB];
constinit os::ThreadType g_server_thread;
@@ -68,7 +69,7 @@ namespace ams::dmnt {
{
/* Create gdb server for the socket. */
util::ConstructAt(g_gdb_server, client_fd);
util::ConstructAt(g_gdb_server, client_fd, g_events_thread_stack, sizeof(g_events_thread_stack));
ON_SCOPE_EXIT { util::DestroyAt(g_gdb_server); };
/* Process for the server. */