Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
To: Gary Benson <gbenson@redhat.com>
Cc: "palves@redhat.com" <palves@redhat.com>,
	"eliz@gnu.org" <eliz@gnu.org>,
	"brobecker@adacore.com" <brobecker@adacore.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: RE: [PATCH 2/2] amd64-linux: expose system register FS_BASE and GS_BASE for Linux.
Date: Wed, 30 Nov 2016 13:31:00 -0000	[thread overview]
Message-ID: <AC542571535E904D8E8ADAE745D60B195136D7FD@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <20161110123553.GA25185@blade.nx>



-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Gary Benson
Sent: Thursday, November 10, 2016 12:36 PM
To: Tedeschi, Walfred <walfred.tedeschi@intel.com>
Cc: palves@redhat.com; eliz@gnu.org; brobecker@adacore.com; gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] amd64-linux: expose system register FS_BASE and GS_BASE for Linux.

Walfred Tedeschi wrote:
> This patch allows examination of the registers FS_BASE and GS_BASE for 
> Linux Systems running on 64bit. Tests for simple read and write of the 
> new registers is also added with this patch.

I tried to add this support a while back and failed, so naturally I think this is amazing--thank you for doing it!

> diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 
> 3f2a92b..a8a0b79 100644
> --- a/gdb/amd64-linux-tdep.c
> +++ b/gdb/amd64-linux-tdep.c
> @@ -103,7 +103,14 @@ int amd64_linux_gregset_reg_offset[] =
>    -1, -1, -1, -1, -1, -1, -1, -1,
>    -1, -1, -1, -1, -1, -1, -1, -1,
>    -1, -1, -1, -1, -1, -1, -1, -1,
> +  /* System register added at the end.  */ #ifdef 
> +HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
> +  21 * 8,  22 * 8,		/* fs_base and gs_base.  */
> +#else
> +  -1, -1,			/* fs_base and gs_base.  */
> +#endif
>    15 * 8			      /* "orig_rax" */
> +
>  };
>  

>  

What is the meaning of the comment?  And why did you add the new fields before orig_rax?  I'm not disputing what you've done, I'd just like to understand it.

I'm not a maintainer so can't approve this, but everything looks right about it in terms of formatting, etc.

Thanks,
Gary


Gary,

Thanks for your review! Usually the orig_rax was left as last register, i have tried to follow that.
On the other hand, since we are adding new szstem registers there is no reason to keep specifically orig_rax at the end.

I will move them around. 

Thanks again,
/Fred
--
http://gbenson.net/
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


  reply	other threads:[~2016-11-30 13:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03  9:47 [PATCH 0/2] amd64: add fs_base and gs_base Walfred Tedeschi
2016-11-03  9:47 ` [PATCH 2/2] amd64-linux: expose system register FS_BASE and GS_BASE for Linux Walfred Tedeschi
2016-11-05 14:55   ` John Baldwin
2016-11-07 14:40     ` Tedeschi, Walfred
2016-11-10 12:36   ` Gary Benson
2016-11-30 13:31     ` Tedeschi, Walfred [this message]
2016-11-23 12:02   ` Pedro Alves
2016-11-30 10:29     ` Tedeschi, Walfred
2016-12-07 16:37       ` Pedro Alves
     [not found] ` <1478166445-21370-2-git-send-email-walfred.tedeschi@intel.com>
2016-11-10 12:37   ` [PATCH 1/2] gdbserver-amd64: add HAVE_STRUCT_USER_REGS_STRUCT_(GS|FS)_BASE for gdbserver Gary Benson
2016-11-23 12:02     ` Pedro Alves
2016-11-30 14:20 ` [PATCH 0/2] amd64: add fs_base and gs_base Gary Benson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AC542571535E904D8E8ADAE745D60B195136D7FD@IRSMSX104.ger.corp.intel.com \
    --to=walfred.tedeschi@intel.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox