mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-22 02:12:06 +00:00
thermosphere: gdb: fix IsThreadAlive
This commit is contained in:
parent
67daf5a73e
commit
3556c12960
1 changed files with 2 additions and 2 deletions
|
@ -53,12 +53,12 @@ GDB_DECLARE_HANDLER(IsThreadAlive)
|
||||||
{
|
{
|
||||||
unsigned long threadId;
|
unsigned long threadId;
|
||||||
|
|
||||||
if (GDB_ParseHexIntegerList(&threadId, ctx->commandData, 1, 0) == NULL) {
|
if (GDB_ParseHexIntegerList(&threadId, ctx->commandData, 1, 0) == NULL || threadId < 1) {
|
||||||
return GDB_ReplyErrno(ctx, EILSEQ);
|
return GDB_ReplyErrno(ctx, EILSEQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 coreMask = ctx->attachedCoreList;
|
u32 coreMask = ctx->attachedCoreList;
|
||||||
return (coreMask & BIT(threadId)) != 0 ? GDB_ReplyOk(ctx) : GDB_ReplyErrno(ctx, ESRCH);
|
return (coreMask & BIT(threadId - 1)) != 0 ? GDB_ReplyOk(ctx) : GDB_ReplyErrno(ctx, ESRCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
GDB_DECLARE_QUERY_HANDLER(CurrentThreadId)
|
GDB_DECLARE_QUERY_HANDLER(CurrentThreadId)
|
||||||
|
|
Loading…
Reference in a new issue