From nobody Tue Nov 26 08:51:25 2024 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=1709736197; cv=none; d=zohomail.com; s=zohoarc; b=fU4n8aRLZeW0b/ZChjjHV+V4VZB6B/+9VvQFtmoB3Ofgv47PwgFp+jEY5S1pGpx4qvV3p9mhtSoOwjim2iLJWB+lgusKNHLneUYVY+zi0+NcqeBuKreSb2HIoF15OQb3lOpgxNVhNDR+v/t2iQd5D+YyOnaiNeVFuc46HTyVGCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709736197; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=soJfHp369BNDgXM8MEutI1aVk/FtLr15JEFPPe/Y+aw=; b=b1Ah/8A6xkDjdnL22XO9pFxaDMlWHNrddneLZOgGEl+2iX8sNHjv4fiGm57oUctwtlBNqacZv5IIopZ8fjvDUYhdLihuPXPOG31BgLSy5YHqkrDdsVnuDp5z1677YiasGzUAH9WOAzoqLAwoRONc51UZkjUIvV+MJQNTPqgnEfA= 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 1709736197493462.02390011357454; Wed, 6 Mar 2024 06:43:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhsS4-0007Q4-KR; Wed, 06 Mar 2024 09:41:00 -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 1rhsS3-0007Or-If for qemu-devel@nongnu.org; Wed, 06 Mar 2024 09:40:59 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhsRx-0001Tz-8z for qemu-devel@nongnu.org; Wed, 06 Mar 2024 09:40:59 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-33d9c3f36c2so1158809f8f.2 for ; Wed, 06 Mar 2024 06:40:50 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v7-20020a5d59c7000000b0033e475940fasm5392620wry.66.2024.03.06.06.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 06:40:45 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 78B705F9CE; Wed, 6 Mar 2024 14:40:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709736049; x=1710340849; 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=soJfHp369BNDgXM8MEutI1aVk/FtLr15JEFPPe/Y+aw=; b=BN9ky0vGmQDhv6nUjiPsINkWHSt8zA3q8wcMkLECZOy10slKLaSW5ZEsqZpm69MVIC rdOWTDmaKmI9u+c5+hV81YEQjRaJTctmOFChnRGg7IS+jrEgrardBoEeLix/8aAiBGzQ lyU0bGPTSly9SlmtwSr3LofDDmBVyCdy0yMJ8S9cvTCuQqnJD4nrRrMNgcUk4863udkb 4Y+WJuUF5g4t2QsMkeFzFPugWfUF25yuHPDKixVENgwnxvNUdQmphginqKIJnqkUgrog 7QJXoQ9mep1BcWve5Xu4JzZb/Rr5C28NVpCkyxpvkRyqHYtJIpdbmjY2di6Lt9pJkTqV S9rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709736049; x=1710340849; 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=soJfHp369BNDgXM8MEutI1aVk/FtLr15JEFPPe/Y+aw=; b=KiLUMb96W2ub1kuZvaoGx28dVb5YgeKxrUsY3hbR+fCQ2F/pnhUDGPSvAVvk5dISXz kGZw7QGRHd3jlkDIn6xFNIDpMq5r+rZjNfg1oCR3O3KB5OIVsmapK/PtHDiRYGy5vDlx 8Smf/R+qXVOf8Joy1QHzQRaEjVm7mC8SYz6HHbPf2Fvnz0FdBSceammVW4D22eFmlcPD TUOeaR9yKdoDoqdVFebt5BQDIvNXOHfWsCcNvGUf5Knm+Hdaki4jiBpM9s2hQUAI5KqK QU7/zIsQBXg0lPEmrforUyd5snqQtWfeRaW5SxBFgMEEoW/rfGi7HlkRVKcJE9UPW7mv VF9Q== X-Gm-Message-State: AOJu0YyjwE5RlaR1uJ+/wp9HAL5WDDv5x3sv8Tj4X3WwCOAE/XWSwA9Z m8DRV6TSxOBwO33PFWWMyvZQNRL8ufBW6Cl1oGQ6RRJ8WayMSkYuxN152g+9nqs= X-Google-Smtp-Source: AGHT+IGd1z+Vh9m+OUvvvf14GpCGogGRJepxf8zuguXq/e0sEOVfhrAcgxSwGi2m9JNmWpbQhbmTxg== X-Received: by 2002:adf:e60b:0:b0:33e:ed4:f9f6 with SMTP id p11-20020adfe60b000000b0033e0ed4f9f6mr11093285wrm.37.1709736049335; Wed, 06 Mar 2024 06:40:49 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/29] gdbstub: Introduce gdb_handle_query_supported_user() Date: Wed, 6 Mar 2024 14:40:21 +0000 Message-Id: <20240306144041.3787188-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240306144041.3787188-1-alex.bennee@linaro.org> References: <20240306144041.3787188-1-alex.bennee@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=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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: 1709736198151100001 From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires advertising the fork-events feature, which is user-specific. Introduce a user-specific hook for this. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-9-iii@linux.ibm.com> Signed-off-by: Alex Benn=C3=A9e Message-Id: <20240305121005.3528075-10-alex.bennee@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 56b7c13b750..e6063835b1f 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -196,6 +196,7 @@ void gdb_handle_v_file_pread(GArray *params, void *user= _ctx); /* user */ void gdb_handle_v_file_readlink(GArray *params, void *user_ctx); /* user */ void gdb_handle_query_xfer_exec_file(GArray *params, void *user_ctx); /* u= ser */ void gdb_handle_set_catch_syscalls(GArray *params, void *user_ctx); /* use= r */ +void gdb_handle_query_supported_user(const char *gdb_supported); /* user */ =20 void gdb_handle_query_attached(GArray *params, void *user_ctx); /* both */ =20 diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 2909bc8c69f..7be4418dcb5 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1655,9 +1655,15 @@ static void handle_query_supported(GArray *params, v= oid *user_ctx) g_string_append(gdbserver_state.str_buf, ";qXfer:exec-file:read+"); #endif =20 - if (params->len && - strstr(get_param(params, 0)->data, "multiprocess+")) { - gdbserver_state.multiprocess =3D true; + if (params->len) { + const char *gdb_supported =3D get_param(params, 0)->data; + + if (strstr(gdb_supported, "multiprocess+")) { + gdbserver_state.multiprocess =3D true; + } +#if defined(CONFIG_USER_ONLY) + gdb_handle_query_supported_user(gdb_supported); +#endif } =20 g_string_append(gdbserver_state.str_buf, ";vContSupported+;multiproces= s+"); diff --git a/gdbstub/user.c b/gdbstub/user.c index 866a25f9c06..c9e8b83d720 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -382,6 +382,10 @@ void gdbserver_fork_end(CPUState *cpu, pid_t pid) disable_gdbstub(cpu); } =20 +void gdb_handle_query_supported_user(const char *gdb_supported) +{ +} + /* * Execution state helpers */ --=20 2.39.2