From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14771 invoked by alias); 10 Nov 2016 12:36: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 14750 invoked by uid 89); 10 Nov 2016 12:36:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Systems X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Nov 2016 12:35:56 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF5513B731; Thu, 10 Nov 2016 12:35:54 +0000 (UTC) Received: from blade.nx (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAACZrLw016265; Thu, 10 Nov 2016 07:35:54 -0500 Received: by blade.nx (Postfix, from userid 1000) id 762E8801A2C1; Thu, 10 Nov 2016 12:35:53 +0000 (GMT) Date: Thu, 10 Nov 2016 12:36:00 -0000 From: Gary Benson To: Walfred Tedeschi 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. Message-ID: <20161110123553.GA25185@blade.nx> References: <1478166445-21370-1-git-send-email-walfred.tedeschi@intel.com> <1478166445-21370-3-git-send-email-walfred.tedeschi@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478166445-21370-3-git-send-email-walfred.tedeschi@intel.com> X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00244.txt.bz2 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 -- http://gbenson.net/