From patchwork Tue Apr 4 14:59:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 670037 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp2492680wrt; Tue, 4 Apr 2023 08:00:30 -0700 (PDT) X-Google-Smtp-Source: AKy350a1NngxXp8H7Kuu8su38sxeCoWYE8E3/2nLfBuvfglwT6JXkADLL47DjlbGJgo9jDJMEC30 X-Received: by 2002:a05:6214:408:b0:572:6e81:ae9c with SMTP id z8-20020a056214040800b005726e81ae9cmr41536664qvx.1.1680620429976; Tue, 04 Apr 2023 08:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680620429; cv=none; d=google.com; s=arc-20160816; b=tVRt3WxlavAY+7xKdpOkM0BcgC0e8nNnDlgiPMSbWC0NyG1TONHaNfreg/NJEgxwhq MLkGfGayycq35eVPCZooHmpf0e5ZWiyS+MBcR1k+Q1/6chd8dJJ5aP/D8WCr3Zo9Fq1h P5hax2ZTKzxvjrWuXZBftfNRPXCm4aTbz5AAObifPlKbxrh4+Zb0eofc/sy3NQzY3PxA tXWQJ17/N6tx0bLBXgiCr7iuCaI+7paUYTZwA+25N7Xfj4rGtf88VcPo4iL12+o/R9+9 2BkjQJjzj2avB9PGU/zo4d3k71g/kZbTl24Da9oIscxyS+KtQuafbE/Hn/u2VhNdVtGn dssg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aAf+TE0WUqHD9GQJtq5AggVi3R+s0Li7ZN1ZFaHMUt0=; b=bpbl0TdhMyjcLVX2tTbuPT9zdVJRdRc/O9V+Ybv9NfZzrWjGfoi3VhVTfbjZLAsT/T aE9wKLkE0UG/zQ9K5f78+usrgJ/15mMbWhREGlJM5UgqAKAz5geyl3PCjHCxZbRUkDf5 PVT0v34LGKdJK3bY69wgd9uTUAbN9kg2JPtaDGsWUMs2cysf+JyqwFkk9jHcCZeTkjzM qJJt/8TU0EsCya1liHpP/MBuggvAj/6Jax9/j5qiXm7jMe1SN1AEWefGZVszYq9DpEDt rknfHpGUlLGV4mVyB7x+manLm6vQipoQK2zLxdvCBsbhXgqoEqRke5eA6NHj4sdZ9L4D TgdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ftp8OB1w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e19-20020ac84e53000000b003e38f231618si8025335qtw.712.2023.04.04.08.00.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Apr 2023 08:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ftp8OB1w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pji8L-0004ID-5j; Tue, 04 Apr 2023 10:59:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pji8E-0004D8-KZ for qemu-devel@nongnu.org; Tue, 04 Apr 2023 10:59:35 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pji87-0005AR-QY for qemu-devel@nongnu.org; Tue, 04 Apr 2023 10:59:30 -0400 Received: by mail-wm1-x330.google.com with SMTP id s13so19196228wmr.4 for ; Tue, 04 Apr 2023 07:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680620366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aAf+TE0WUqHD9GQJtq5AggVi3R+s0Li7ZN1ZFaHMUt0=; b=ftp8OB1wIRjD4kMxXPqAODo5trzK11UJo9uxmhcNElR6hnQiEOQXjsp3ILYMaK1Jgb UFIeqb0bRGXV9PHmjKDzi6clodXIJj6pIn763a4KNt/GnWluvSw9XJQDo6LiWjccXU56 S/dOXpLEDRBYBgf/8pcAt/G2bZnf9r98FatEV+RVXwztoJYXpWDz3bhqZ460aaiBy+If f1nBAkXpan9EJzxAs0L2G2NwVC7cEmYac0BKrm6bNN/hDaqXH2Q7qIWFZHnu9i+EIlbM 5m0CHfhtzvhvDmE22ysiu4TcqTINcxRKarmaYIcP22w2E2SDvujYfK9JhCAJRphzx4gX Thyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680620366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aAf+TE0WUqHD9GQJtq5AggVi3R+s0Li7ZN1ZFaHMUt0=; b=QzVI0A/JkyQq3Q+uQot31na8huweYgFOs40yUkkurNAmR7FFMlwEO1kVQ5wXOfR4u6 BV424AZ9Dq4O/9WNmfo1fqBl59g9lG1qJG6EfYnP9zICURZQKrcG8liFMnbu69JfqdB3 Mim3j8jF/a6bhvIrD0LyQ5S3v/tUBOno62t/xffSSR2ILRzHjOZFvzkuKbd5h4IbYfYE Bg1kzgIcrFhOYNL0pSHA4xYw4lP8KPligK7laOtyJiNLEGqW0u9mfuTtSCHo9yYQnv0c 7/Yu7rN5A8eR2daLjZiHTUM7lmY5SbST5gDlAOOgFyPaJ8pzHdflV0CUtJqeJ7URdYat nD+g== X-Gm-Message-State: AAQBX9cCZqSEJ1F2ZNqktLOQYjSBIi3KaqEtI5+lY+F/SvobyOrIr+vB QoZGeyYW8FqIWnYSFEu8iCI2MQ== X-Received: by 2002:a05:600c:4591:b0:3f0:3070:f4ea with SMTP id r17-20020a05600c459100b003f03070f4eamr14116162wmo.11.1680620366187; Tue, 04 Apr 2023 07:59:26 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o9-20020a05600c4fc900b003ef6bc71cccsm23234584wmq.27.2023.04.04.07.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 07:59:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6844E1FFBB; Tue, 4 Apr 2023 15:59:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Warner Losh , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 03/10] gdbstub: don't report auxv feature unless on Linux Date: Tue, 4 Apr 2023 15:59:18 +0100 Message-Id: <20230404145925.2638152-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230404145925.2638152-1-alex.bennee@linaro.org> References: <20230404145925.2638152-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 Fixes: 51c623b0de ("gdbstub: add support to Xfer:auxv:read: packet") Reported-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Warner Losh Tested-by: Warner Losh Message-Id: <20230403134920.2132362-4-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 2a66371aa5..0760d78685 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -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+"); }