From nobody Wed Feb 11 02:11:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677812558; cv=none; d=zohomail.com; s=zohoarc; b=FbNRaX62SXn4qP0CnE0WGhwXVngjNy9Z8o5+vWzzME65aIgFgyqF3hX4aPs4MBj6ZGbJ7vOtF57CZ2s6KJEpoO3GabQcaeIhpc7KssQwpit5VWpvdppAyuU7tiMRaRa1uucQMEl9cnbWb+Wtnf/UzceaA0mV1twxBhwl3P6WYLo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677812558; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OEtCGKXwc5R5woyG/cv3/9an/+vnS/RcluuE2Zr/HR4=; b=OQsgqcxpsat2hMRaAeRdqYcD7B1BXf2W1FqFqs2Dar4aawKDwW27CRg8WNHfMH3reKI/FafQcOie/H49xaj5YKn1BDa9E0TnK6RV0x7XybQb8wedrrrl5PdZUQO8Safa5bYOnmy0y6zP0wHTtSBTLztPNzoUB8nHoA9oWCSGcF4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677812558440451.6438093131894; Thu, 2 Mar 2023 19:02:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXvco-0007VU-14; Thu, 02 Mar 2023 21:58:26 -0500 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 1pXvcb-0007Pd-KC for qemu-devel@nongnu.org; Thu, 02 Mar 2023 21:58:13 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXvcZ-0001o8-Vq for qemu-devel@nongnu.org; Thu, 02 Mar 2023 21:58:13 -0500 Received: by mail-pl1-x62a.google.com with SMTP id i10so1322252plr.9 for ; Thu, 02 Mar 2023 18:58:11 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:f3e6:4626:fbc8:b2ce]) by smtp.gmail.com with ESMTPSA id e4-20020a17090301c400b001992e74d055sm372244plh.12.2023.03.02.18.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 18:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677812290; 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=OEtCGKXwc5R5woyG/cv3/9an/+vnS/RcluuE2Zr/HR4=; b=ma6jETDKNQbGFVQe7d9Ly+86QJKjlO8SZVCIATBQ96evOAQsbbseHBXbj+L4gD0Zey secRSGC7JhPGlHaW4TtbBiz3UZJZirGYRdwYY+p65AHQ1a+BYG3ry3CsG0FHNEOpErp6 BMsjoToi24PE1CLzTrxaS5+rlTt/aKgqOExwcE06/n0IZAmva8+4Zoc5MFkAEWACPnGy WmBXuGxBwAijCOzBK6hTNEQHQQ1Jtp0d3/MIAYGjz5cDkA5YKXScvRBhySVnwPFz6/yE Qz1AxzEfRhH5kWXDM6xM7VM5rtZfzQT4PxVrNnYOwS6Q5ESD9f+TwqskBkBgPe4q1mRR qM3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677812290; 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=OEtCGKXwc5R5woyG/cv3/9an/+vnS/RcluuE2Zr/HR4=; b=FfV5V+woj1SyIjZlH0wX1srJs1W+gF/Mn8tY6/SMXB4u5qjQ4X4ZKkMS9GF63biDz+ Fy6qtzY20nXLxGKDa2GjSix6JWSp5JUP+6Bun3UX2GZZoOc4hNl6y/4MGg4TgJR1Ozfm +wxKyxZO/3aLxki19cut4M/0Wrg8KJJK5Xtff0G/CxGPHh7SPekCw5GepcoHX0T2qWxL VuV4q4A4Aa21RVy75bHg9tT8K7rPiLNbP8iVTMFHpWhF+cGt5b47fE3vRSPmxGemuXsZ 4huaA/JVE6iG9N9L63dBNMF6r1WMnFvm5qiQ0byxVRwHqEzIStpsIuiwqWQafXQNlXRD yVAQ== X-Gm-Message-State: AO0yUKWtlVrf2gzaI0FbOoPj1cUXIuE8g0if0maV13abIGoUssehbQHk vDGV0YY1CHCzxZCeBRtinc24TjqVaMhTVEgPuxw= X-Google-Smtp-Source: AK7set8Bei/bq/MsqIq7qbHiieTU65RK+BvubYCyuQ6xhW2GANWJTXAwIMhQWkr8Qwjotialmw3PoA== X-Received: by 2002:a17:903:11c3:b0:19e:6657:2c21 with SMTP id q3-20020a17090311c300b0019e66572c21mr516711plh.7.1677812290351; Thu, 02 Mar 2023 18:58:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4.5 03/29] gdbstub: Make syscall_complete/[gs]et_reg target-agnostic typedefs Date: Thu, 2 Mar 2023 18:57:39 -0800 Message-Id: <20230303025805.625589-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230303025805.625589-1-richard.henderson@linaro.org> References: <20230303025805.625589-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677812559751100003 From: Philippe Mathieu-Daud=C3=A9 Prototypes using gdb_syscall_complete_cb() or gdb_?et_reg_cb() don't depend on "cpu.h", thus are not target-specific. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20221214143659.62133-1-philmd@linaro.org> Signed-off-by: Alex Benn=C3=A9e Message-Id: <20230302190846.2593720-4-alex.bennee@linaro.org> --- include/exec/gdbstub.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index f667014888..1636fb3841 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -71,9 +71,6 @@ struct gdb_timeval { uint64_t tv_usec; /* microsecond */ } QEMU_PACKED; =20 -#ifdef NEED_CPU_H -#include "cpu.h" - typedef void (*gdb_syscall_complete_cb)(CPUState *cpu, uint64_t ret, int e= rr); =20 /** @@ -126,6 +123,7 @@ int gdb_handlesig(CPUState *, int); void gdb_signalled(CPUArchState *, int); void gdbserver_fork(CPUState *); #endif + /* Get or set a register. Returns the size of the register. */ typedef int (*gdb_get_reg_cb)(CPUArchState *env, GByteArray *buf, int reg); typedef int (*gdb_set_reg_cb)(CPUArchState *env, uint8_t *buf, int reg); @@ -133,6 +131,9 @@ void gdb_register_coprocessor(CPUState *cpu, gdb_get_reg_cb get_reg, gdb_set_reg_cb set_r= eg, int num_regs, const char *xml, int g_pos); =20 +#ifdef NEED_CPU_H +#include "cpu.h" + /* * The GDB remote protocol transfers values in target byte order. As * the gdbstub may be batching up several register values we always --=20 2.34.1