From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6OPHJQcmpGde0CUAWB0awg (envelope-from ) for ; Wed, 05 Feb 2025 22:01:27 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xwtv2b88; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 95E191E105; Wed, 5 Feb 2025 22:01:27 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 351151E05C for ; Wed, 5 Feb 2025 22:01:27 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA0953858420 for ; Thu, 6 Feb 2025 03:01:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA0953858420 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xwtv2b88 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id A778E3858C51 for ; Thu, 6 Feb 2025 03:00:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A778E3858C51 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A778E3858C51 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1035 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738810857; cv=none; b=SooNhJ1LhuU5PYZPwtHmGH8OIvaaGc1vZT9b45SpXK2RHUQ9de3S2P/ACl/xeAbcWXMzsUugItj2/x1a/itR5li0BDqWm6qO+sR/H9gMtahikVtHTSGrHYeL0aDNpKoKVjvnph41Vxj5sS1eGwx2jJ/mbrqrOE3MC/8MEdpfIrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738810857; c=relaxed/simple; bh=MPbyjnxLxEGcBP3Zc5CxoxYj4vs4vYuxQkfeMkpZhXQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=eJZyLW5Kw+j8cKeB/vY5OC5dPl4paZvWjH7994Y8rNCYsl1+xEvoRkKXwMEoA4ch6jE2EXLK0V5fCgGeUpAf5iKC2PYq8Fc8QHB1TMiUsjqE+ZrBVWJWOp7jBC4CjcAUNU4lsQm/AYxDQOo28Klf88/tl3hyQXnCufqrX3DBm30= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A778E3858C51 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2f9e415fa42so677725a91.1 for ; Wed, 05 Feb 2025 19:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738810857; x=1739415657; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=0EbOY4R9p+LJfVdC8MA165fxBaFQxHIMCUUg85CPYsQ=; b=xwtv2b885jzonf+ac7cpG0gnVf7jqAuNw9m3AUIKnSmXHO/aCpvC3HL6+fs0YzeZF0 6AvTrQpxm9ZU/PNhmbIqvJmLhoLF4QRUdBscCa13p/bXPuRGXHIYAtKLETUL6qIFJZQA 2R8uNzTkMxmxTctAPxdp75KKpb4Fvvwe+wzy4ssVa342IBx0FTPpN4YtkCO2wgfMTs1O /82hf0PJ6OIwDD3fq3q95UgsqsDSTP91TGkRGHpLM17Votl+7JeYSDTlqRZTw9iOmAgi dVEizrmryAt57MN9wKmwyEu7xQTbINwOFFNBhdLHHOamS7fFT10anJq9XrMSu08ekJKr lR0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738810857; x=1739415657; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0EbOY4R9p+LJfVdC8MA165fxBaFQxHIMCUUg85CPYsQ=; b=RaeG2Tpokl6TRkf9QCYpRZVkiAjyuXCuruRS/WnpQOsmZ+G6nPLzXzE+LZ4YUsOaza ukuqgvrB5gpjmVtZMmBy0IsnvwHzdJo7u6Qt2IjdrF1st4+rNywjiB0ScCvcFQqYcpCn keD9iOLWbtIORRXMvgLirG+2PV3RhvyWrM9em83h6B6OwidBkgA1dr51iiP4PTF7xYYW BoU60BNOzw3LU+KPt/K0WEsdeahuRFQl1hQ4nsFGA9SVxSVhpfOT3l9eqW298PiPIUF+ Bg2Fe0Ic59OEc/WN7ev3lSbNJ3RO7u0zwoD7l7jVI76EEFVdCo/X2TxjMgmK9yVogYa6 0+Mg== X-Gm-Message-State: AOJu0Yzi3ILqKnFNEQ72snAfrGCJw0VuUoslGQjjYwPdnjk2v+yVHBwx AcRL+o1oDmZb4TST2bmLDJXNRriOctdts69XVt0fYiELOApmORGuoL/MITwS6E0= X-Gm-Gg: ASbGncthunkMpZtb968+aQA5UH2g3z5zI9xwEsp2g9Cv+EXHW8PXZwm5QuY9SOgu4fA BEiAKfUxW+5tUrfGWZa2nfvOObFDBXi8zs1q/bqgCqKCbRQypQFpXX8/ZSp8w/rCgjyJ+h6qq9M FHBJPCn/IYlcylrleXi+OjpXiPm1GlbkWeF8xGcLjuCWlWetxnSLEjOiWsoXrPFVzd41870fJOO qeDw2bcGdjLZeEX76i1yMHa7qRWY6+vgAoa2KspIb1GDjcWeoWKF8dvUyR2lF6GGS36yR7J4zms ZYh1KJPXTfm3xh9UDFi1xf0= X-Google-Smtp-Source: AGHT+IFl7trqIDIkFUV7vdR/NrSCppE/itFCjkIfqzllquwn9KzC6hHSv6yUiMP9XcqXnIXg4+1Mtw== X-Received: by 2002:a17:90b:4c4a:b0:2ee:d63f:d77 with SMTP id 98e67ed59e1d1-2f9e076782fmr8573173a91.9.1738810856695; Wed, 05 Feb 2025 19:00:56 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:7e5:16be:a0c6:ff7]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21f3650f8fcsm1430105ad.32.2025.02.05.19.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2025 19:00:56 -0800 (PST) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 03/12] gdbserver: Add assert in x86_linux_read_description. In-Reply-To: <20241220200501.324191-4-christina.schimpe@intel.com> (Christina Schimpe's message of "Fri, 20 Dec 2024 20:04:52 +0000") References: <20241220200501.324191-1-christina.schimpe@intel.com> <20241220200501.324191-4-christina.schimpe@intel.com> User-Agent: mu4e 1.12.8; emacs 29.4 Date: Thu, 06 Feb 2025 00:00:54 -0300 Message-ID: <87pljvixp5.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org "Schimpe, Christina" writes: > On x86 the PTRACE_GETREGSET request is currently only used for the xstate regset. > The size of the xstate regset is initialized to 0 such that it can be reset to > the appropriate size once we know it is supported for the current target > in x86_linux_read_description. > > However, this configuration would not just affect the xstate regset but any regset > with PTRACE_GETREGSET request that is added in the future. The new regset would be > misconfigured with the xstate regset size. To avoid this we add an assert for > unsupported regsets and check explicitly for the note type of the register set. > --- > gdbserver/linux-x86-low.cc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Thiago Jung Bauermann -- Thiago