From 042ecf53435e6daf9bec3180402f3fd81a65cc03 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Mon, 26 Jun 2017 16:57:25 +0200 Subject: [PATCH] Fix write-only hw watchpoint handling --- sysmodules/rosalina/source/gdb/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysmodules/rosalina/source/gdb/debug.c b/sysmodules/rosalina/source/gdb/debug.c index 0ac3a636..cc02450c 100644 --- a/sysmodules/rosalina/source/gdb/debug.c +++ b/sysmodules/rosalina/source/gdb/debug.c @@ -363,13 +363,13 @@ int GDB_SendStopReply(GDBContext *ctx, const DebugEventInfo *info) case STOPPOINT_WATCHPOINT: { - const char *kinds = "arwa"; + const char *kinds[] = { "", "r", "", "a" }; WatchpointKind kind = GDB_GetWatchpointKind(ctx, exc.stop_point.fault_information); if(kind == WATCHPOINT_DISABLED) GDB_SendDebugString(ctx, "Warning: unknown watchpoint encountered!\n"); GDB_ParseCommonThreadInfo(buffer, ctx, SIGTRAP); - return GDB_SendFormattedPacket(ctx, "%s%cwatch:%08x;", buffer, kinds[(u32)kind], exc.stop_point.fault_information); + return GDB_SendFormattedPacket(ctx, "%s%swatch:%08x;", buffer, kinds[(u32)kind], exc.stop_point.fault_information); break; }