From 63e3f40fa5d1140bcca6990bf8f803e65448fcd1 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Sat, 1 Feb 2020 19:50:28 +0000 Subject: [PATCH] thermosphere: fix gdb/regs.c assertions --- thermosphere/src/gdb/regs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thermosphere/src/gdb/regs.c b/thermosphere/src/gdb/regs.c index e17bb3008..1ca3c4525 100644 --- a/thermosphere/src/gdb/regs.c +++ b/thermosphere/src/gdb/regs.c @@ -18,7 +18,7 @@ GDB_DECLARE_HANDLER(ReadRegisters) { - ENSURE(ctx->selectedThreadId == currentCoreCtx->coreId); + ENSURE(ctx->selectedThreadId == 1 + currentCoreCtx->coreId); ExceptionStackFrame *frame = currentCoreCtx->guestFrame; FpuRegisterCache *fpuRegCache = fpuReadRegisters(); @@ -52,7 +52,7 @@ GDB_DECLARE_HANDLER(ReadRegisters) GDB_DECLARE_HANDLER(WriteRegisters) { - ENSURE(ctx->selectedThreadId == currentCoreCtx->coreId); + ENSURE(ctx->selectedThreadId == 1 + currentCoreCtx->coreId); ExceptionStackFrame *frame = currentCoreCtx->guestFrame; FpuRegisterCache *fpuRegCache = fpuGetRegisterCache(); @@ -138,7 +138,7 @@ static void GDB_GetRegisterPointerAndSize(size_t *outSz, void **outPtr, unsigned GDB_DECLARE_HANDLER(ReadRegister) { - ENSURE(ctx->selectedThreadId == currentCoreCtx->coreId); + ENSURE(ctx->selectedThreadId == 1 + currentCoreCtx->coreId); ExceptionStackFrame *frame = currentCoreCtx->guestFrame; FpuRegisterCache *fpuRegCache = NULL; @@ -168,7 +168,7 @@ GDB_DECLARE_HANDLER(ReadRegister) GDB_DECLARE_HANDLER(WriteRegister) { - ENSURE(ctx->selectedThreadId == currentCoreCtx->coreId); + ENSURE(ctx->selectedThreadId == 1 + currentCoreCtx->coreId); ExceptionStackFrame *frame = currentCoreCtx->guestFrame; FpuRegisterCache *fpuRegCache = fpuGetRegisterCache();