From patchwork Fri Apr 26 19:41:27 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: 792350 Delivered-To: patch@linaro.org Received: by 2002:adf:cc13:0:b0:346:15ad:a2a with SMTP id x19csp625124wrh; Fri, 26 Apr 2024 12:44:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXA9V5aNwqDk/N5NZN0ghw6LAvq9ELW7CAQ1SYA/WWuG9TAGk5L4PVzNChora3mAjszsUOmTIMyhRr1GzDrJ+9M X-Google-Smtp-Source: AGHT+IESsQ6AQvJv51STyPmQEcP17QL3bMRN9VVROQSc2mbjn3vTV2+goFUnTKzsKl4ZBC8eJABR X-Received: by 2002:ac8:58c4:0:b0:436:8356:bf5 with SMTP id u4-20020ac858c4000000b0043683560bf5mr4643403qta.60.1714160642615; Fri, 26 Apr 2024 12:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714160642; cv=none; d=google.com; s=arc-20160816; b=m5WKQhUOhAW+FgjmyBXmU+Cl1NsUbIS4QVUglLmO92+y9i63eavPD0HlTv1tSBtZTi uOzRzMerG8BUsGmMDpAdET8SVVVHMLpDKjF1T7WOOlJpW7xFaYOiUCkdFBxqatnvZa3M wT3GyEAvI1ITLLP3K5rQxXyX7Wmgm+0CQQY8gVTSp+xYcoQl5MJ0IF3VLeWP4XPk2Mq0 ng5Cm0eBZvDa9KyE0SzDMGVl/3dE4ST7I2rWUp8TM6edoN5JhGjfMIJLlmjXk1G+0joN nB3zvWncdlb9N1RpUbqVt8DzF5LY15IKqdqlj//acsktxDGcZYslZC4C1gjYLhIaBP92 jX7Q== 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=t0nMCqhYKzp5r2ZnGbDu0d0x6qlsj2uY/rxTdGpirtw=; fh=l2kfs+/h7+HpgbfyDT1jiv751sa6ON8Djpmc0d1l2tY=; b=NnP9c8trWn3usvq+z+Si2EyO2cMq2SBoIn5u7Xy91eS3ROMh1h30na51l+Y9Rg1AUm Y3lGLY3+uHxZMI33lGUxAjTgK/J1GQX6pPRzLF5JTE+UOYtM2aFkv56Ju8pKd+y06cfw J4ZExCeGOHwbJQPlC+6LPGiHyT7Kl6LBpbtAVjH6sUZu3TVFdxJFSdrvTaiidF7N6Gx+ O0XnXWS91eR8xhL96UGggubJDn6WZw5KtdSrjJypRLWyZl2agmwCdpHiy4L2GwLEeF9x L+R1icDh3WVqfHK+lZy45O4pp/9/bW5CYCDdQ+eH2D9G6qZKfg3TNm/L3Zg8VFbePtPu juxw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qN6nv4rJ; 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 g6-20020ac87d06000000b00439b6e2ec9fsi12586243qtb.39.2024.04.26.12.44.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2024 12:44:02 -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=qN6nv4rJ; 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 1s0RTA-0000oX-2x; Fri, 26 Apr 2024 15:42:52 -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 1s0RT9-0000m2-3F for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:42:51 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0RT6-0002xH-Er for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:42:50 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-571c22d9de4so3503243a12.3 for ; Fri, 26 Apr 2024 12:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714160565; x=1714765365; 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=t0nMCqhYKzp5r2ZnGbDu0d0x6qlsj2uY/rxTdGpirtw=; b=qN6nv4rJWdPVWrNZoycw2XsB/z87C8srPfzNU8bIrHq+iSq30rZILMLDCinYkjOam4 PDWeF44Na8uzf0xzL9Hd4TZTn5/wZxAhtjtfzQfD5FEcbtzy3NK0L+gGe7qpN/v8n4s/ piZlqI9++tetkfnWLMxscTcTPo+AZIsoFNebY+gfdJMeaD9PhklZi4ULrmIuCeLMx1MM /SseirdfFr6FRAku2YRFDo4NrJejKUZVu8opo8rNWxeOVj/8tbRbn4FAvf7/qv4rPRl3 BnyipHYfzkrkeQAFEJ/VSG5/6DjZGXR5JfuxzxIjjUl7A43wfJnrmTxM/iRI+z3FygyP 5sgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714160565; x=1714765365; 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=t0nMCqhYKzp5r2ZnGbDu0d0x6qlsj2uY/rxTdGpirtw=; b=XB1CXvcpj2h2zDftneBgyvvYZ5yWqqowT5aEDIH5Da87adTB9q3/Wh46dV/h/TB0hW UmFDlzV7kX1Ak3/Fv9yONTISG9Lyqk1b7yDPlmKWDgpB3NGanGEpXMdCkvYGG9EZwd5W /DLfQHszLkyKHL7m9f5H2y/Mvp5gZAc0bFoo7nR9K++3vJOfxZgnlMm7rg5CnhozXkir 1DgVeWNpN4EebFdyhH0a4mE670OcuEq1BfKr+dUh3lpgZWWo7aLBqdleBOQ5oDLGjWvI w2npsrpL6ElkZYQzjoqaQsG5PDFR/HeSyUmxWk0d90W0KTaUuGZjQnSXDvHUGVERHYoF lJOA== X-Gm-Message-State: AOJu0YxM4H3l8Znzqj/rRNtfvEyuMrRIQehhTr+nhUKkOirPmiiCi9p3 kRB6R21Qeo3JjpX/Qa/Fi2l2wsPODj6ytpCQXds5WLKusNNwegtWA6GD5ZdqlGH7+Tjd+BHKH2A LDBc= X-Received: by 2002:a50:a6dc:0:b0:572:6b03:607 with SMTP id f28-20020a50a6dc000000b005726b030607mr44695edc.42.1714160565256; Fri, 26 Apr 2024 12:42:45 -0700 (PDT) Received: from m1x-phil.lan (aul93-h02-176-184-11-147.dsl.sta.abo.bbox.fr. [176.184.11.147]) by smtp.gmail.com with ESMTPSA id cf8-20020a0564020b8800b0056c24df7a78sm10395889edb.5.2024.04.26.12.42.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 26 Apr 2024 12:42:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 07/38] gdbstub: Simplify #ifdef'ry in helpers.h Date: Fri, 26 Apr 2024 21:41:27 +0200 Message-ID: <20240426194200.43723-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240426194200.43723-1-philmd@linaro.org> References: <20240426194200.43723-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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 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 6b97610f48..6277a858a1 100644 --- a/include/gdbstub/helpers.h +++ b/include/gdbstub/helpers.h @@ -12,7 +12,10 @@ #ifndef _GDBSTUB_HELPERS_H_ #define _GDBSTUB_HELPERS_H_ -#ifdef COMPILING_PER_TARGET +#ifndef COMPILING_PER_TARGET +#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_ */