gdbstub: don't report auxv feature unless on Linux
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 3 Apr 2023 13:49:12 +0000 (14:49 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 4 Apr 2023 14:56:44 +0000 (15:56 +0100)
The later handler if conditionally compiled only for Linux but we
forgot to ensure we don't advertise it lest we confuse our BSD
brethren.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: 51c623b0de ("gdbstub: add support to Xfer:auxv:read: packet")
Reported-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Tested-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20230403134920.2132362-4-alex.bennee@linaro.org>

gdbstub/gdbstub.c

index 2a66371aa576db8e3b720dc0876af70c223178f1..0760d786858fe9aab49c70bd32087169abd84184 100644 (file)
@@ -1468,7 +1468,7 @@ static void handle_query_supported(GArray *params, void *user_ctx)
             ";ReverseStep+;ReverseContinue+");
     }
 
-#ifdef CONFIG_USER_ONLY
+#if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX)
     if (gdbserver_state.c_cpu->opaque) {
         g_string_append(gdbserver_state.str_buf, ";qXfer:auxv:read+");
     }