amd64-linux-tdep: Don't treat fs_base and gs_base as system registers.

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>
This commit is contained in:
John Baldwin
2023-03-06 16:47:03 -08:00
parent b1453f150c
commit 3625712636

View 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);