From patchwork Fri Mar 22 16:14:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781859 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp1432051wrj; Fri, 22 Mar 2024 09:16:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUH9xa7SQN9S6iH59Ye3aeIWfn1mb7gusrfP50QI4tuFuJ2AfpsRohVf6x5ZQnhMupTMDIiRg0zw99YO8IQF0Ni X-Google-Smtp-Source: AGHT+IHAPiLejsKqhiRf8LgfR5bCufZKJbMfhX3H6ggBlF94jQLxTyiUyIntSRDAykd6WfYX/maa X-Received: by 2002:a05:622a:47cb:b0:431:3012:972a with SMTP id dp11-20020a05622a47cb00b004313012972amr2455655qtb.59.1711124173709; Fri, 22 Mar 2024 09:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711124173; cv=none; d=google.com; s=arc-20160816; b=nwRACQODQTO7s8Slb5EDQ4mJgvV4W5ED1fZOEJ//pG71+O+k7i1PkEoKMqd6JLH9Ly y3a8sp0ja/NDLXoSeTiLsAOy6rN75YoyxIYynL4aOfvkBtUZjxOko42SF59AQy/xDLDF n/xK/UCZdT0+RqivQnFyrgEfCsd3R150iH3w3ggRZvg/2do9avTNUiPBh0GJMUaReR0c K1eLmSXyPZ2nWpc4dis93kIYuOR59JA+E67rNWeD4N+snHqr7gP8YDc+wUHfrX68+J2+ 0e2MXAUeBvw1wZbCx6nd5s473IZFZN3717yAHORdFF0E27Pv1zbbdFsI5Xy+hOQ1AAJ8 X9xg== 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=M3jectw/kExol21Tl/VOhcbnait7BaHf+x9145daJsc=; fh=uMYX6igvBBl0pyyuaBqcf0xekXw0hQPDx/Ls/Uq9n2s=; b=g49v//8iCQnah27Rx9El94cKeKl130v3OVfRyWiXYWHDtMjTZnqyTa+irbOXqd+cHW w3wafnw+Xg7GpgLkuDveuQ33U1hQInUHPK/qo6+g9zb5VWWkO88e2BinW3k4FCdkD+Cy jKhkch2Y2a7Uznrg4C9KnLXNBmFXtuGO8yDP+CJGiQWhM2r2QpVHGwo3IMb75q/cir1v WyBKbCcbJRaT4z42eMcoZm7nFp3mq/BDw9qXfstJZbi4PIsvA85CRQrp3knV2Fx+0GW6 8ZckHr3bksZZkK0uH21MOz5e+xjTnwU4ve5knv4CPftDsMrNbsWP836U8X2xbyzxb8vB A10g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pABTf919; 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 u7-20020a05622a14c700b0043095dc92dcsi2096001qtx.634.2024.03.22.09.16.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Mar 2024 09:16:13 -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=pABTf919; 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 1rnhXh-0000fX-TS; Fri, 22 Mar 2024 12:14:53 -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 1rnhXg-0000f9-Ak for qemu-devel@nongnu.org; Fri, 22 Mar 2024 12:14:52 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnhXe-0000oT-U8 for qemu-devel@nongnu.org; Fri, 22 Mar 2024 12:14:52 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4147f659353so648445e9.3 for ; Fri, 22 Mar 2024 09:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711124089; x=1711728889; darn=nongnu.org; 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=M3jectw/kExol21Tl/VOhcbnait7BaHf+x9145daJsc=; b=pABTf919d9+eW0pdvw9yCl9wg1eJD/xtdWDH+WhEf7Gz+ykAH68Pj3pWqmwzSG5NUY p1OzkP42tXwKipPZivi/P/rmbuEeRhRKr4x6lTWlNnT93ZiVhM+u/ZANW5OW8cQQTLwl sMvobVBQ925x6aq28lpYgC4Evas+kqMLTPSROxQ37qHNARFU1BpOE8bfAkFtFSM8Ee92 DVHgnxde+RA+xQouxccekHde+aqbKqv5+XQmvf/9/SvEaGKommVBNSaZw6dEzxAMjYE4 G/oZYi6XtJPOBEynIkD/I6YCMNXmU5Fb1024MvtICTQ476MbTQzXFpSYLGNE1oplZ/O1 5UVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711124089; x=1711728889; 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=M3jectw/kExol21Tl/VOhcbnait7BaHf+x9145daJsc=; b=tWujU4YU5ilvsZ2KDmgRhWpVQTPNpkF4ngewID/N1DECxhOC6dPrpKNWZmkfuf9Q4S fBahfh1Q6D/X9EMsQSbBovc3A0kcZ0+XeBKDzPP/9nQTC1R4xjgSm/KP84o157/b7vxe aEiLsdpqs277f6dhRrIBx6GjPdriRPcQkbcVTF6iJD1FG3/iyWDBFZKrNgcx7DouZV3a l2DoL7X8hHgliR+4PI+H27yXJMRMWIkS/TOhdOMxjf/qUv/+APJAcFSBXF+z2aRJFeBK eedYNGnU9yarijDVPK6se5jbYKYxRP6K9KzumceWm+QAcmP4uMoiDU/5qS5Q5uHduK9s yOhw== X-Gm-Message-State: AOJu0YzSeU7ikIKPrKLKV2W8wohsBSbFbnqlrhATywdy8LPsyQ5Bm6Wm Uizl0nJlGinI/QFqNKHnWx3ePoze38puHK3GvC+72KV+Qg/1nmh7zCWmp0I/YuKgRCNnWqWV5+3 9 X-Received: by 2002:a05:600c:5617:b0:413:315f:9e8d with SMTP id jr23-20020a05600c561700b00413315f9e8dmr1991336wmb.18.1711124089140; Fri, 22 Mar 2024 09:14:49 -0700 (PDT) Received: from m1x-phil.lan ([176.176.178.251]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c1c0800b004146bcdde06sm3530094wms.6.2024.03.22.09.14.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 22 Mar 2024 09:14:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Paolo Bonzini , Peter Maydell Subject: [PATCH-for-9.1 v2 1/3] gdbstub: Simplify #ifdef'ry in helpers.h Date: Fri, 22 Mar 2024 17:14:37 +0100 Message-ID: <20240322161439.6448-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240322161439.6448-1-philmd@linaro.org> References: <20240322161439.6448-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=unavailable 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 Slightly simplify by checking NEED_CPU_H definition in header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/gdbstub/helpers.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h index c573aef2dc..53e88d807c 100644 --- a/include/gdbstub/helpers.h +++ b/include/gdbstub/helpers.h @@ -12,7 +12,10 @@ #ifndef _GDBSTUB_HELPERS_H_ #define _GDBSTUB_HELPERS_H_ -#ifdef NEED_CPU_H +#ifndef NEED_CPU_H +#error "gdbstub helpers should only be included by target specific code" +#endif + #include "cpu.h" /* @@ -96,8 +99,4 @@ static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf, int len) #define ldtul_p(addr) ldl_p(addr) #endif -#else -#error "gdbstub helpers should only be included by target specific code" -#endif - #endif /* _GDBSTUB_HELPERS_H_ */