diff options
Diffstat (limited to 'gdb/amd64-nat.c')
-rw-r--r-- | gdb/amd64-nat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c index 680105b..ff04339 100644 --- a/gdb/amd64-nat.c +++ b/gdb/amd64-nat.c @@ -68,6 +68,13 @@ amd64_native_gregset_reg_offset (struct gdbarch *gdbarch, int regnum) if (regnum >= num_regs) return -1; + /* Kernels that predate Linux 2.6.25 don't provide access to + these segment registers in user_regs_struct. */ +#ifndef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE + if (regnum == AMD64_FSBASE_REGNUM || regnum == AMD64_GSBASE_REGNUM) + return -1; +#endif + return reg_offset[regnum]; } |