From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iduZH5Jh3mqoBhoAWB0awg (envelope-from ) for ; Sun, 25 Oct 2026 16:07:46 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fv1WLvcX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 67C2D378002; Sun, 25 Oct 2026 16:07:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 80CCE378002 for ; Sun, 25 Oct 2026 16:07:44 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EA3F54BA2E36 for ; Sun, 25 Oct 2026 20:07:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA3F54BA2E36 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fv1WLvcX Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id C2B3E4BA2E13 for ; Sun, 25 Oct 2026 20:07:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2B3E4BA2E13 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C2B3E4BA2E13 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792958836; cv=none; b=ISZhU+EEUjbQc+msl2692fhsb+FtLmznTAhHOPJzrkYBwiJ0DAEueJX1yXqFpVhhg2p/mzQ9onDpJOn8yGBG4HKz8ee1xU3VJptdaiYim0/0A+1UUnlRfst3leKErUtCeusJZxfF3V6KfwkvA6ICnQtyY3GPJijSAVpRyCwPzlE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792958836; c=relaxed/simple; bh=F4ayoNL0tLA9mVRryJyn5NDcnTJ1rgvWHo+uTigk7Is=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=P4vSqU7q3QDLGcO1RwX8pCYk+1Lwxk7JGZUAV9r4FYUKY1nhziJefUQxHf9ZN39sQ0zI6RAcTxfrfLYNBVbqS+A/L8CsYRP2Ackwh9ZlLOyhsq9a8LJbgnRHjqI/7q9M+oLvs9QnymoqCYpg/qgXxuHBY6geFtwLE7JNKz+9xjk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fv1WLvcX DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2B3E4BA2E13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792958836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1kVk5eUHaTaNKmpFeK+UTRVFYpKTr4UBSzQsQ5nau68=; b=Fv1WLvcXB9Y8sRTunAMhv7Su5nJLCD3sMjz7khrPI6KkkmiEthPu9b4tWe1OQELDJheUjn Jn23ME/ocdHLQe/z8kpayM+XDujZfVAgtx32Zc9AoCEamxt7YYPLjdXNP7gw3TRqaVInRk QPfwkW/ImBURZ+Vr35aDNc/Jpu7E+M4= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-299-eQxkDMjGOJKYx6nulWo0mA-1; Sun, 25 Oct 2026 16:07:14 -0400 X-MC-Unique: eQxkDMjGOJKYx6nulWo0mA-1 X-Mimecast-MFC-AGG-ID: eQxkDMjGOJKYx6nulWo0mA_1792958834 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9087A18002AB; Sun, 25 Oct 2026 20:07:13 +0000 (UTC) Received: from [100.90.172.125] (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D81541956089; Sun, 25 Oct 2026 20:07:12 +0000 (UTC) Message-ID: <32cc0c22-1fbf-4b10-92fa-906fad95564a@redhat.com> Date: Sun, 25 Oct 2026 13:07:10 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] gdb/riscv: recover FLEN from the NT_FPREGSET note size in core files To: Farid Khaidari , gdb-patches@sourceware.org References: <20261022154417.235510-1-khaidari.fg@gmail.com> <20261022154417.235510-2-khaidari.fg@gmail.com> From: Kevin Buettner In-Reply-To: <20261022154417.235510-2-khaidari.fg@gmail.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Dt3jzUdLGqC8OIvnz0VcEYdFqIRFCSTVFhtQ0MGoz18_1792958834 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Hi Farid, On 10/22/26 8:44 AM, Farid Khaidari wrote: > A Linux kernel core has no float ABI in e_flags and no RISC-V > attributes. Opened without the executable, it gets an integer-only > target description, and "p $fa0" fails with "Invalid register 'fa0'" > even though the core holds the FP state. > > The kernel writes 32 FP registers of FLEN bytes plus fcsr into > NT_FPREGSET, so the note size gives FLEN. Use it when e_flags says > nothing. > > The test core is a real kernel dump with a 264-byte NT_FPREGSET, > i.e. FLEN = 8. > > Signed-off-by: Farid Khaidari > --- > gdb/riscv-tdep.c | 89 +++++++++++++++++- I don't think that riscv-tdep.c is the correct place to add knowledge about linux specific features. It seems to me that much of what you've done here ought to be placed in gdb/riscv-linux-tdep.c. If it's not truly linux-specific, but would be of benefit to other riscv platforms, then this should be explained in the commit log as well as in the code comments too. Kevin