From: Eli Zaretskii <eliz@gnu.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: include NT_I386_TLS note in generated core files
Date: Tue, 23 Sep 2025 22:41:29 +0300 [thread overview]
Message-ID: <86ldm5c5xy.fsf@gnu.org> (raw)
In-Reply-To: <c31c9dbbbc9fd347302bf482f4ada62de469ec7d.1758648698.git.aburgess@redhat.com> (message from Andrew Burgess on Tue, 23 Sep 2025 18:31:46 +0100)
> From: Andrew Burgess <aburgess@redhat.com>
> Cc: Andrew Burgess <aburgess@redhat.com>
> 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.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2025-09-23 19:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 11:22 Andrew Burgess
2025-09-23 17:31 ` Andrew Burgess
2025-09-23 17:33 ` [PATCHv2] " Andrew Burgess
2025-10-14 13:54 ` [PATCHv3] " Andrew Burgess
2025-10-14 14:12 ` Eli Zaretskii
2025-10-29 9:49 ` Schimpe, Christina
2025-11-05 13:57 ` [PATCHv4] " Andrew Burgess
2025-11-06 21:20 ` Keith Seitz
2025-11-12 9:44 ` Schimpe, Christina
2025-11-13 19:35 ` Andrew Burgess
2025-11-14 9:37 ` Schimpe, Christina
2025-11-20 17:19 ` Andrew Burgess
2025-09-23 19:41 ` Eli Zaretskii [this message]
2025-09-23 20:19 ` [PATCH] " Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ldm5c5xy.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox