From 070949f39ee96bd16654e6623ab4ff627d918ba6 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 7 Feb 2015 09:38:42 +0100 Subject: gdbstub: Fix qOffsets packet detection qOffsets has no additional optional parameters. So match the complete string to avoid stumbling over possible future commands with identical prefix. Signed-off-by: Jan Kiszka Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdbstub.c') diff --git a/gdbstub.c b/gdbstub.c index 8abcb8a451..86772d0257 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1107,7 +1107,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) break; } #ifdef CONFIG_USER_ONLY - else if (strncmp(p, "Offsets", 7) == 0) { + else if (strcmp(p, "Offsets") == 0) { TaskState *ts = s->c_cpu->opaque; snprintf(buf, sizeof(buf), -- cgit v1.2.3