[0/2] amd64: add fs_base and gs_base

Message ID 20161130142016.GA12916@blade.nx
State New, archived
Headers

Commit Message

Gary Benson Nov. 30, 2016, 2:20 p.m. UTC
  Hi Walfred,

Walfred Tedeschi wrote:
> The next two patches add Linux system registers fs_base and gs_base
> in GDB and gdbserver.
> 
> First commit align the gdbserver with GDB code  in terms of
> HAVE_STRUCT_USER_REGS_STRUCT_(GS|FS)_BASE.
> 
> Second patch introduces the registers into GDB and gdbserver.

I tried this with the Infinity stuff I'm doing today and it's working
great.  The only change I had to make was to add the new registers to
amd64_dwarf_regmap with the patch below.

Thanks,
Gary

--
  

Patch

diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index a3a1fde..d0450cc 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -223,8 +223,8 @@  static int amd64_dwarf_regmap[] =
   -1,
 
   /* Segment Base Address Registers.  */
-  -1,
-  -1,
+  AMD64_FSBASE_REGNUM,
+  AMD64_GSBASE_REGNUM,
   -1,
   -1,