From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id x778GRYB02hDxQ8AWB0awg (envelope-from ) for ; Tue, 23 Sep 2025 16:20:38 -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=ie+ZxxrG; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 57BA21E04C; Tue, 23 Sep 2025 16:20:38 -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 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 67F301E04C for ; Tue, 23 Sep 2025 16:20:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E669E3858419 for ; Tue, 23 Sep 2025 20:20:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E669E3858419 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=ie+ZxxrG 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 565273858D26 for ; Tue, 23 Sep 2025 20:19:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 565273858D26 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 565273858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758658795; cv=none; b=CnDdp2pDRpP6leAowbWI+p7gi+XB+m+U01okeJTFS3+eQ5Z6GKMeXsA5w3c4ihcfi9xFsyQ9v9apeooaxnFCGosUl644pwLGkOz4prqkJ4x56O+0/L/x6wnk72f1fLUT6w9vFqcAWMPGWknRd2eWcFEE+utHziH/1jRjkt/dTYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758658795; c=relaxed/simple; bh=Y5++VB+SYjasjc6tbHuGoZNpom8g5jYqNPwpbmExRPw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xrZRzmW2biZMc4YN6tHI+jVnAUdS8B+6/BLckW0b5HrJfn5BCWGg3R4K12TS1AlHrDhZYUyH1DxYL6crb6/zoyZvAez4IUhdU8AnFI7j2HwE2VADtgxvMmRf/0FUCq3XAvSn+vzrJSXu+5JaqxOT8lPSPsCAlTzhmzRYyM3aLV0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 565273858D26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758658795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e1eXH9P8PPBfdSLCayBYEj3bW+qlPs1qDC2A0oY7ZHs=; b=ie+ZxxrGETudZQDGZe+LDcX2s09blHLpt8067D0/+/F3ohRUZMRDquXYqP+mfU8E3v8BUZ OH2S0O0+zfXPapRb+0eO95+ch6v+KbLh2uW0skDSS8EKnsl5pOuaTF57UYmDMjUfArxLlJ hRLubhS15X6xY5FoSOI8/acvzI898cQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-gTSvhimXMNCf_VUBMW_lMw-1; Tue, 23 Sep 2025 16:19:52 -0400 X-MC-Unique: gTSvhimXMNCf_VUBMW_lMw-1 X-Mimecast-MFC-AGG-ID: gTSvhimXMNCf_VUBMW_lMw_1758658791 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-46e19ee1094so21003765e9.0 for ; Tue, 23 Sep 2025 13:19:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758658791; x=1759263591; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e1eXH9P8PPBfdSLCayBYEj3bW+qlPs1qDC2A0oY7ZHs=; b=ZRXNLtDATLLxLMEjMwCysby9o3gFBM8fSNEE/OP1/kSwwOtU3pgky9KQcVj9kzqtEg jkDFQqPUG8IDNDR1S24dAsIJB44/S8aPxVNOzpxhblBTiKIom8Q6+ABbcqdwFj5QEC6I gvh2xRJnUIPJMQEhXiFeswD/BOSR2vX4MpsAL9agn9H8BcCGR13Jnze1nyIolxO63Rf7 eFXl9tGiNdiNTrzDwSEbPjzGDDMpMZuOo6OLYbzM/Vxvv6VyLTRsqLWuwuX/yLZEcwp8 a+xmjr6cvAmEAmPLLFqTqB0b0P4bIOXWuLk47uQYBt7quVt4L3Dn9uVjSvu7ZT2fHEYD 6rsA== X-Gm-Message-State: AOJu0YyVHuWoS0r4j0b/56tK8KOnOTxoqi3g5YsPBwIqGMFBc0YNGgTR p2fcC9e+6LO5JJyYlvMHS7GxsS6prW7LjrPp+Kid7Lx006bhIfUcXp5tiCEjOv8Clokdpd2KWJa eiZUpjLU/qLUdkL4iS5evBtHOPYd1iqll1B+JCqgwcrvQ8jMDclbvESrRVKGGIMyJtpji/jQ= X-Gm-Gg: ASbGncs9hkb+EX+8DV5YYbbmZKb0RBU2kiIhEHWO9IbJag1ymxIcuMe9Xo4eH5dV7p4 0ZbVJZI+UWJpOkeYUYg81Np/Bye+eZdtpQlhHDXo1EKyh1GYhl514eVfEYljxhSFYzzBGmYAzNr M2f4Y2x9IIJxMr7Fl0GKiq1iRZzUhR22d2nD1bxFhM8aUwjx1Qo/2dWwW5bLsMPvsbgi2TEKByI mJi5957pm+6NFDM1X+wJpzkfExGaPofyriQQeLG+A0QaddT24HDF5KPsfgOxtii0x6asQ8XltxY n33JyvuCg2uvqqgjCIATVZkOCrrkq/Pq7wY= X-Received: by 2002:a05:6000:401f:b0:3ea:80ec:855d with SMTP id ffacd0b85a97d-405c5bd86e0mr2679100f8f.19.1758658791014; Tue, 23 Sep 2025 13:19:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyXzk57Jq4FJVnX7FfL2clq/eghm7EqKo/f4HZfIoJHpIh4YKu0x4wvqWkdE4DpwlIPo9NtQ== X-Received: by 2002:a05:6000:401f:b0:3ea:80ec:855d with SMTP id ffacd0b85a97d-405c5bd86e0mr2679090f8f.19.1758658790633; Tue, 23 Sep 2025 13:19:50 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3ee0fbc730dsm25472968f8f.41.2025.09.23.13.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Sep 2025 13:19:50 -0700 (PDT) From: Andrew Burgess To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: include NT_I386_TLS note in generated core files In-Reply-To: <86ldm5c5xy.fsf@gnu.org> References: <35c3bcb9e7cd1b7b9192adeda9acd3417525f97d.1756812133.git.aburgess@redhat.com> <86ldm5c5xy.fsf@gnu.org> Date: Tue, 23 Sep 2025 21:19:49 +0100 Message-ID: <878qi4gbve.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -67i61UNsjx7WAT9ixy4lAV7K9kEZcqIHjs8di5WGO8_1758658791 X-Mimecast-Originator: redhat.com 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 Eli Zaretskii writes: >> From: Andrew Burgess >> Cc: Andrew Burgess >> Date: Tue, 23 Sep 2025 18:31:46 +0100 >> >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=15591 >> --- >> gdb/NEWS | 4 + >> gdb/amd64-linux-nat.c | 26 +- >> gdb/doc/gdb.texinfo | 11 +- >> gdb/features/i386/32bit-linux.c | 7 + >> gdb/features/i386/32bit-linux.xml | 5 + >> gdb/i386-linux-nat.c | 21 ++ >> gdb/i386-linux-tdep.c | 171 +++++++++- >> gdb/i386-linux-tdep.h | 15 + >> gdb/i386-tdep.h | 5 + >> gdb/nat/amd64-linux.h | 29 ++ >> gdb/nat/i386-linux.h | 10 + >> gdb/nat/x86-linux.c | 44 +++ >> gdb/nat/x86-linux.h | 15 + >> gdb/testsuite/gdb.arch/i386-linux-tls-regs.c | 74 +++++ >> .../gdb.arch/i386-linux-tls-regs.exp | 314 ++++++++++++++++++ >> gdb/x86-linux-nat.c | 67 ++++ >> gdb/x86-linux-nat.h | 17 + >> gdbserver/linux-x86-low.cc | 99 ++++++ >> 18 files changed, 928 insertions(+), 6 deletions(-) >> create mode 100644 gdb/nat/amd64-linux.h >> create mode 100644 gdb/testsuite/gdb.arch/i386-linux-tls-regs.c >> create mode 100644 gdb/testsuite/gdb.arch/i386-linux-tls-regs.exp > > Thanks. > >> >> diff --git a/gdb/NEWS b/gdb/NEWS >> index 8be367d2424..b7f99551927 100644 >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -87,6 +87,10 @@ single-inf-arg in qSupported >> In systems that don't support linker namespaces, or if the inferior hasn't >> started yet, these always return the integer 0. >> >> +* The 'org.gnu.gdb.i386.linux' target description feature can now >> + contain three additional registers which provide access to the TLS >> + related GDT entries on i386 (and x86-64 when compiling with -m32). >> + >> * Add record full support for rv64gc architectures > > This part is okay. > >> --- a/gdb/doc/gdb.texinfo >> +++ b/gdb/doc/gdb.texinfo >> @@ -50207,8 +50207,15 @@ i386 Features >> @samp{ymm0h} through @samp{ymm15h} for amd64 >> @end itemize >> >> -The @samp{org.gnu.gdb.i386.linux} feature is optional. It should >> -describe a single register, @samp{orig_eax}. >> +The @samp{org.gnu.gdb.i386.linux} feature is optional. If the feature >> +is present, then it should describe the 32 bit register, @samp{orig_eax}. >> + >> +Additionally, the @samp{org.gnu.gdb.i386.linux} feature can optionally >> +contain three 128 bit registers called @samp{i386_tls_gdt_0}, >> +@samp{i386_tls_gdt_1}, and @samp{i386_tls_gdt_2}. Each of these >> +registers contains one 16 byte @samp{struct user_desc} (see @samp{man >> +2 get_thread_area}) object which describes one of the three TLS >> +related GDT entries. > > Suggest to use @kbd instead of @samp when showing the man command > line. I've fixed this in my branch. Thanks, Andrew > > Reviewed-By: Eli Zaretskii