aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2022-03-21 16:58:23 +0000
committerPedro Alves <pedro@palves.net>2022-03-21 17:01:49 +0000
commit4414150d33212f5f395c3bf8a940bccf80ffc508 (patch)
tree3c3fe0d2df9661c1151a5e207dc0dc6e2758020a /gdbserver
parent04f0c03a22135c7eefa47ed99c03e5b3dc9a34e2 (diff)
downloadgdb-4414150d33212f5f395c3bf8a940bccf80ffc508.zip
gdb-4414150d33212f5f395c3bf8a940bccf80ffc508.tar.gz
gdb-4414150d33212f5f395c3bf8a940bccf80ffc508.tar.bz2
gdbserver: Fixup previous patch
The previous prepare_resume_reply change missed updating the 'buf' reference that overwrites the 'T', so if 'buf' was advanced, we'd still overwrite the wrong character. This fixes it. Change-Id: Ia8ce433366b85af4e268c1c49e7b447da3130a4d
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/remote-utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index 0599cc9..db9b2a6 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -1144,7 +1144,7 @@ prepare_resume_reply (char *buf, ptid_t ptid, const target_waitstatus &status)
gdb_assert (buf_start[0] == 'T');
gdb_assert (isxdigit (buf_start[1]));
gdb_assert (isxdigit (buf_start[2]));
- *buf = 'S';
+ buf_start[0] = 'S';
buf_start[3] = '\0';
break;
}