mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-22 10:22:08 +00:00
thermosphere: gdb: fix GDB_SendStopReply
This commit is contained in:
parent
66ba05b302
commit
6499d36722
1 changed files with 13 additions and 2 deletions
|
@ -110,12 +110,14 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info, bool asNotifi
|
||||||
|
|
||||||
switch(info->type) {
|
switch(info->type) {
|
||||||
case DBGEVENT_DEBUGGER_BREAK: {
|
case DBGEVENT_DEBUGGER_BREAK: {
|
||||||
strcat(buf, "S02");
|
n += GDB_ParseExceptionFrame(buf + n, info, 0);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case DBGEVENT_CORE_ON: {
|
case DBGEVENT_CORE_ON: {
|
||||||
if (ctx->catchThreadEvents) {
|
if (ctx->catchThreadEvents) {
|
||||||
strcat(buf, "T05create:;");
|
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
||||||
|
strcat(buf, "create:;");
|
||||||
} else {
|
} else {
|
||||||
invalid = true;
|
invalid = true;
|
||||||
}
|
}
|
||||||
|
@ -152,6 +154,7 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info, bool asNotifi
|
||||||
case Exception_BreakpointLowerEl: {
|
case Exception_BreakpointLowerEl: {
|
||||||
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
||||||
strcat(buf, "hwbreak:;");
|
strcat(buf, "hwbreak:;");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case Exception_WatchpointLowerEl: {
|
case Exception_WatchpointLowerEl: {
|
||||||
|
@ -166,6 +169,12 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info, bool asNotifi
|
||||||
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
||||||
sprintf(buf + n, "%swatch:%016lx;", kinds[cr.lsc], info->frame->far_el2);
|
sprintf(buf + n, "%swatch:%016lx;", kinds[cr.lsc], info->frame->far_el2);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case Exception_SoftwareStepLowerEl: {
|
||||||
|
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: we don't really support 32-bit sw breakpoints, we'll still report them
|
// Note: we don't really support 32-bit sw breakpoints, we'll still report them
|
||||||
|
@ -174,6 +183,7 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info, bool asNotifi
|
||||||
case Exception_SoftwareBreakpointA32: {
|
case Exception_SoftwareBreakpointA32: {
|
||||||
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
n += GDB_ParseExceptionFrame(buf + n, info, SIGTRAP);
|
||||||
strcat(buf, "swbreak:;");
|
strcat(buf, "swbreak:;");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
@ -207,6 +217,7 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info, bool asNotifi
|
||||||
return (int)total;
|
return (int)total;
|
||||||
} else {
|
} else {
|
||||||
invalid = true;
|
invalid = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue