This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/2] amd64: add fs_base and gs_base
- From: Gary Benson <gbenson at redhat dot com>
- To: Walfred Tedeschi <walfred dot tedeschi at intel dot com>
- Cc: palves at redhat dot com, eliz at gnu dot org, brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Wed, 30 Nov 2016 14:20:16 +0000
- Subject: Re: [PATCH 0/2] amd64: add fs_base and gs_base
- Authentication-results: sourceware.org; auth=none
- References: <1478166445-21370-1-git-send-email-walfred.tedeschi@intel.com>
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,