From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86631 invoked by alias); 30 Nov 2016 13:31:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 86540 invoked by uid 89); 30 Nov 2016 13:31:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Gary, Benson, benson, naturally X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Nov 2016 13:30:55 +0000 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 30 Nov 2016 05:30:54 -0800 X-ExtLoop1: 1 Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by FMSMGA003.fm.intel.com with ESMTP; 30 Nov 2016 05:30:52 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX106.ger.corp.intel.com (163.33.3.31) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 30 Nov 2016 13:30:51 +0000 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.52]) by irsmsx155.ger.corp.intel.com ([169.254.14.237]) with mapi id 14.03.0248.002; Wed, 30 Nov 2016 13:30:51 +0000 From: "Tedeschi, Walfred" To: Gary Benson 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. Date: Wed, 30 Nov 2016 13:31:00 -0000 Message-ID: References: <1478166445-21370-1-git-send-email-walfred.tedeschi@intel.com> <1478166445-21370-3-git-send-email-walfred.tedeschi@intel.com> <20161110123553.GA25185@blade.nx> In-Reply-To: <20161110123553.GA25185@blade.nx> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00985.txt.bz2 -----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 Cc: palves@redhat.com; eliz@gnu.org; brobecker@adacore.com; gdb-patches@sou= rceware.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=20 > Linux Systems running on 64bit. Tests for simple read and write of the=20 > new registers is also added with this patch. I tried to add this support a while back and failed, so naturally I think t= his is amazing--thank you for doing it! > diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index=20 > 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[] =3D > -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=20 > +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" */ > + > }; >=20=20 >=20=20 What is the meaning of the comment? And why did you add the new fields bef= ore orig_rax? I'm not disputing what you've done, I'd just like to underst= and it. I'm not a maintainer so can't approve this, but everything looks right abou= t it in terms of formatting, etc. Thanks, Gary Gary, Thanks for your review! Usually the orig_rax was left as last register, i h= ave tried to follow that. On the other hand, since we are adding new szstem registers there is no rea= son to keep specifically orig_rax at the end. I will move them around.=20 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