amd64-linux-tdep: Don't treat fs_base and gs_base as system registers.
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 7 Mar 2023 00:47:03 +0000 (16:47 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 7 Mar 2023 00:47:03 +0000 (16:47 -0800)
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.

Reviewed-By: Tom Tromey <tom@tromey.com>
gdb/amd64-linux-tdep.c

index e9181649ec8053361b826143435958b0d6ce4d0e..cbbac1a0c64e1deb8181b9d0ff6404e328e2979d 100644 (file)
@@ -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);