public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] amd64-linux-tdep: Don't treat fs_base and gs_base as system registers.
Date: Fri, 17 Feb 2023 12:02:19 -0800	[thread overview]
Message-ID: <20230217200219.87439-3-jhb@FreeBSD.org> (raw)
In-Reply-To: <20230217200219.87439-1-jhb@FreeBSD.org>

These registers can be changed directly in userspace, and similar
registers to support TLS on other architectures (tpidr* on ARM and
AArch64, tp on RISC-V) are treated as general purpose registers.
---
 gdb/amd64-linux-tdep.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index e9181649ec8..cbbac1a0c64 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -281,9 +281,7 @@ static int
 amd64_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 				 const struct reggroup *group)
 { 
-  if (regnum == AMD64_LINUX_ORIG_RAX_REGNUM
-      || regnum == AMD64_FSBASE_REGNUM
-      || regnum == AMD64_GSBASE_REGNUM)
+  if (regnum == AMD64_LINUX_ORIG_RAX_REGNUM)
     return (group == system_reggroup
 	    || group == save_reggroup
 	    || group == restore_reggroup);
-- 
2.38.1


  parent reply	other threads:[~2023-02-17 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 20:02 [PATCH 0/2] Fix gdb.arch/amd64-gs_base.exp test on FreeBSD John Baldwin
2023-02-17 20:02 ` [PATCH 1/2] gdb.arch/amd64-gs_base.exp: Support non-Linux John Baldwin
2023-02-17 20:02 ` John Baldwin [this message]
2023-03-03 17:58 ` [PING] [PATCH 0/2] Fix gdb.arch/amd64-gs_base.exp test on FreeBSD John Baldwin
2023-03-03 19:04   ` Tom Tromey

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=20230217200219.87439-3-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).