This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/2] amd64: add fs_base and gs_base


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

-- 
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,
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]