From patchwork Wed Apr 17 18:27:46 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: 789314 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp172497wrm; Wed, 17 Apr 2024 11:29:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV3efX2uRwNbS81q4JiSbWxPmgEtEYia9GeQYCuZukoDl/UkQtQCy9vXnt2+hzpqvAbBPkqsWDirG5v+GBAVcAr X-Google-Smtp-Source: AGHT+IGEl9oubPR63Dul8oEYPtxucJqFCDo9lxi/C5OryvAgDYRsda4IpMNNamSEzo37DMrSVs8M X-Received: by 2002:a37:e209:0:b0:78f:161:c490 with SMTP id g9-20020a37e209000000b0078f0161c490mr168401qki.68.1713378543155; Wed, 17 Apr 2024 11:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713378543; cv=none; d=google.com; s=arc-20160816; b=u5BenNNfAmZAIBZ9F3EmYmhqE9JtcRSf/akyOqb2vioLortFYyk7ANWKLHGTpVsLC0 7qABRYydqRPxwcZB4QBqaBE/ArskgF3RuE0y1ccmKIjEUqzrkmU3PRPARNBGJgs+dP4o B6Evc4O4X25vihapBHWbNkPVBegbfoXX+bsB/a2wK623onUKGD3rIkascswIs/0QvNFz U8bRmkBlOaKdtgPH4Vb4Ur22TP/COd9BgaD1ku0PS2uzMf/S1jc4KqBYIDh9uelVw/zo aWXWvy6QBsgf1gherCKtZO7oaY4M8GBnwLbrq8n9M+lnKnnv0kW2rM3bUZQHRb2FuC3K vS8g== 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=GXSzECYTToI5yG00Nu/fEQEka/0Hmt5e5edwX0HsJB4=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=saepj9NeMhSgliW3ibJg149bnqdnWT+naFGf84DULFHc2u6m0V2RvtX4DEkQO7ED8d H3GACQ+5Evln9uY+RAbBaTgLYclzDNfeTcAiheG1t29WmJSn3xULhdVahAFkWicKB+kR TAfkJzzpqrUBX4AhjFDFMLzWyTD6bLSkaQSQyc9/G1B1OgfiIcz3Ua/FEvmKERV93AU2 NwcY8RDd3uB90Q6TkJUS0yl0JW+oGbWQjStU2vLrR2q4WRpZesT/3Uk4Ob0s30nY2aEm 6GpeI4kJ3OLIFqICHn7Iaimdr0J0Q0GFoi6V1ITe+csV6zmEWhGBcayX7d/UQJ/l2DlO g1TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hS22Pnlo; 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 s1-20020a05620a030100b0078ed673542fsi10642280qkm.171.2024.04.17.11.29.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2024 11:29:03 -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=hS22Pnlo; 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 1rxA18-0007a2-VS; Wed, 17 Apr 2024 14:28:22 -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 1rxA17-0007Zs-MS for qemu-devel@nongnu.org; Wed, 17 Apr 2024 14:28:21 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxA15-0003GO-4h for qemu-devel@nongnu.org; Wed, 17 Apr 2024 14:28:20 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4187c47405aso261875e9.3 for ; Wed, 17 Apr 2024 11:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713378495; x=1713983295; 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=GXSzECYTToI5yG00Nu/fEQEka/0Hmt5e5edwX0HsJB4=; b=hS22Pnlo6JPfnRRjInc5jTfb/KhHFpCuxJEjkRS5ayDoVioPvTSm0SXu6nGPFYQDTp w7GMtboIUZ2yYOUFUfA7BGE467eZUtq7f1JM9Nuz0ootiNpgS9vL3+sQNJ9OIyFhE+mY gBWCnqxh5vdy8SeAth15+/BP/uy/HOZzktMfZIK2sejlaelvZFPKirnWUTa7Fughl86i UT6QwTeorpdhpVxNf3wVkuPbHQrnG4Qv2lQIM9kvX1VQtvQo31AogAD+ium83Gjoetp7 dcz5F9A7uAXgiU/5hiHQm8qM/jhCIP2su4wq2El5YRrvAdwfX1aW+oUJeUhqpsAYHfAF a43Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713378495; x=1713983295; 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=GXSzECYTToI5yG00Nu/fEQEka/0Hmt5e5edwX0HsJB4=; b=nrsHYHmF6bl9ktGfeCdRrSPr/q0xE+9uIBfxAzyv0FGrmcsHlncQz/1K7gn45QrA/p Agh0sUWtaQU1QKcltN1YJdhDIa79OuOyKBXT/WJZkwwMLY+otdV5sJXbzomTwzdL0Fxi 5xQlSp7+OBv4iD8AxOpMKiRGxamAzcxQ7cgiMKz0K+ePWgFxBOr+pym3syzeU/oOpAOi fviZKYBsZVZarWLDYgoPgmLzc5NIBJeXyTTMwdQxOx2gRz2Tm2uAzEkK/x+WDZbKmXie 9V8CI2xBsYc5ge8uUHJoMgbjxuwLhKoyZX96r+hx/rB06r5BuGYUQPGFHKVewmYkJqgA Qdjg== X-Gm-Message-State: AOJu0Yyp643HOwTPToBgbtH+Ttqj1hNjfPIksCRihBuop2Q7IQfosy3T 5WxwHw4tBmWsRWtgptyaXEVzFNQjAz+iMl+W/Ch00Lw+x711Z4W1Ayn+8Wym+YpG+bCpfKCrdCA 4 X-Received: by 2002:a05:600c:3581:b0:418:41a7:d032 with SMTP id p1-20020a05600c358100b0041841a7d032mr328663wmq.13.1713378495644; Wed, 17 Apr 2024 11:28:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.201.23]) by smtp.gmail.com with ESMTPSA id d15-20020a05600c34cf00b0041897c6171dsm3648880wmq.16.2024.04.17.11.28.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Apr 2024 11:28:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 01/21] gdbstub: Simplify #ifdef'ry in helpers.h Date: Wed, 17 Apr 2024 20:27:46 +0200 Message-ID: <20240417182806.69446-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240417182806.69446-1-philmd@linaro.org> References: <20240417182806.69446-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 Slightly simplify by checking NEED_CPU_H definition in header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240322161439.6448-2-philmd@linaro.org> --- 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_ */