1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-19 08:52:25 +00:00

thermosphere: fix thread reporting logic, etc

This commit is contained in:
TuxSH 2020-02-01 16:28:31 +00:00
parent cb4d898579
commit 46c82e2d77
3 changed files with 5 additions and 3 deletions

View file

@ -72,6 +72,7 @@ CFLAGS := \
-fno-unwind-tables \ -fno-unwind-tables \
-std=gnu11 \ -std=gnu11 \
-Wall \ -Wall \
-Werror \
-Wno-main \ -Wno-main \
$(ARCH) $(DEFINES) $(ARCH) $(DEFINES)

View file

@ -236,6 +236,8 @@ int GDB_ReceivePacket(GDBContext *ctx)
ctx->state = GDB_STATE_ATTACHED; ctx->state = GDB_STATE_ATTACHED;
} }
// Debug
ctx->buffer[checksumPos + 2] = '\0';
DEBUGRAW("->"); DEBUGRAW("->");
DEBUGRAW(ctx->buffer); DEBUGRAW(ctx->buffer);
DEBUGRAW("\n"); DEBUGRAW("\n");

View file

@ -70,8 +70,7 @@ GDB_DECLARE_QUERY_HANDLER(fThreadInfo)
{ {
// We have made our GDB packet big enough to list all the thread ids (coreIds + 1 for each coreId) // We have made our GDB packet big enough to list all the thread ids (coreIds + 1 for each coreId)
char *buf = ctx->buffer + 1; char *buf = ctx->buffer + 1;
int n = 1; size_t n = 0;
buf[0] = 'm';
u32 coreMask = ctx->attachedCoreList; u32 coreMask = ctx->attachedCoreList;
@ -89,7 +88,7 @@ GDB_DECLARE_QUERY_HANDLER(sThreadInfo)
{ {
// We have made our GDB packet big enough to list all the thread ids (coreIds + 1 for each coreId) in fThreadInfo // We have made our GDB packet big enough to list all the thread ids (coreIds + 1 for each coreId) in fThreadInfo
// Note: we assume GDB doesn't accept notifications during the sequence transfer... // Note: we assume GDB doesn't accept notifications during the sequence transfer...
return GDB_SendPacket(ctx, "m", 1); return GDB_SendPacket(ctx, "l", 1);
} }
GDB_DECLARE_QUERY_HANDLER(ThreadEvents) GDB_DECLARE_QUERY_HANDLER(ThreadEvents)