mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 08:22:04 +00:00
thermosphere: gdb: remove currentThreadId; migrate rx irq
This commit is contained in:
parent
02e2a1efa2
commit
f0b9162d5e
4 changed files with 2 additions and 11 deletions
|
@ -127,7 +127,6 @@ static void GDB_Disconnect(GDBContext *ctx)
|
|||
ctx->flags = 0;
|
||||
ctx->state = GDB_STATE_DISCONNECTED;
|
||||
|
||||
ctx->currentThreadId = 0;
|
||||
ctx->selectedThreadId = 0;
|
||||
ctx->selectedThreadIdForContinuing = 0;
|
||||
ctx->sentDebugEventCoreList = 0;
|
||||
|
|
|
@ -73,7 +73,6 @@ typedef struct GDBContext {
|
|||
|
||||
u32 attachedCoreList;
|
||||
|
||||
u32 currentThreadId;
|
||||
int selectedThreadId;
|
||||
int selectedThreadIdForContinuing;
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@ int GDB_SendStopReply(GDBContext *ctx, DebugEventInfo *info, bool asNotification
|
|||
|
||||
case DBGEVENT_CORE_ON: {
|
||||
if (ctx->catchThreadEvents) {
|
||||
ctx->currentThreadId = info->coreId + 1; // FIXME?
|
||||
strcat(buf, "T05create:;");
|
||||
} else {
|
||||
invalid = true;
|
||||
|
@ -145,7 +144,6 @@ int GDB_SendStopReply(GDBContext *ctx, DebugEventInfo *info, bool asNotification
|
|||
|
||||
case DBGEVENT_EXCEPTION: {
|
||||
ExceptionClass ec = info->frame->esr_el2.ec;
|
||||
ctx->currentThreadId = info->coreId + 1; // FIXME?
|
||||
|
||||
// Aside from stage 2 translation faults and other pre-handled exceptions,
|
||||
// the only notable exceptions we get are stop point/single step events from the debugee (basically classes 0x3x)
|
||||
|
|
|
@ -27,7 +27,7 @@ GDB_DECLARE_HANDLER(SetThreadId)
|
|||
}
|
||||
|
||||
ctx->selectedThreadId = id == 0 ? (int)currentCoreCtx->coreId + 1 : (int)id;
|
||||
// TODO: change irq affinity (and remove selectedThreadId?)
|
||||
GDB_MigrateRxIrq(ctx, (u32)(ctx->selectedThreadId - 1));
|
||||
return GDB_ReplyOk(ctx);
|
||||
} else if (ctx->commandData[0] == 'c') {
|
||||
if(strcmp(ctx->commandData + 1, "-1") == 0) {
|
||||
|
@ -62,12 +62,7 @@ GDB_DECLARE_HANDLER(IsThreadAlive)
|
|||
|
||||
GDB_DECLARE_QUERY_HANDLER(CurrentThreadId)
|
||||
{
|
||||
if (ctx->currentThreadId == 0) {
|
||||
// FIXME: probably remove this variable
|
||||
ctx->currentThreadId = 1 + currentCoreCtx->coreId;
|
||||
}
|
||||
|
||||
return GDB_SendFormattedPacket(ctx, "QC%x", ctx->currentThreadId);
|
||||
return GDB_SendFormattedPacket(ctx, "QC%x", 1 + currentCoreCtx->coreId);
|
||||
}
|
||||
|
||||
GDB_DECLARE_QUERY_HANDLER(fThreadInfo)
|
||||
|
|
Loading…
Reference in a new issue