From 6ba3b7791decba0f5449f9dd1ca667cd78c527e7 Mon Sep 17 00:00:00 2001 From: Scott Knight <4534275+knightsc@users.noreply.github.com> Date: Wed, 28 Nov 2018 11:12:57 -0500 Subject: [PATCH] Set correct register number in gdb stop reply https://github.com/bminor/binutils-gdb/blob/master/gdb/features/arm/arm-core.xml According to the current arm register definition file in gdb the cpsr register is actually register number 25 and not 16. --- src/gba/remote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/remote.cpp b/src/gba/remote.cpp index 5c5a43b0..7ba0d82a 100644 --- a/src/gba/remote.cpp +++ b/src/gba/remote.cpp @@ -3612,7 +3612,7 @@ void remoteSendStatus() s += 12; CPUUpdateCPSR(); v = reg[16].I; - sprintf(s, "10:%02x%02x%02x%02x;", (v & 255), + sprintf(s, "19:%02x%02x%02x%02x;", (v & 255), (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255);