From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26077 invoked by alias); 6 Aug 2014 18:32:55 -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 26068 invoked by uid 89); 6 Aug 2014 18:32:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f202.google.com Received: from mail-yk0-f202.google.com (HELO mail-yk0-f202.google.com) (209.85.160.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 06 Aug 2014 18:32:53 +0000 Received: by mail-yk0-f202.google.com with SMTP id q9so387707ykb.1 for ; Wed, 06 Aug 2014 11:32:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=w4CbIh4ZyaPk+E8hybHIsXIo9APXAdz0PHhU2r08rd4=; b=hFB30GCFwI2PgqnjyggtwYaOnKJb2jme6I3UN3TFtF7ucP175gQyWg8/LphosDGaV1 lmUkBMkA5MkZB+KlSsoyiBJuHEFSYsfvI8OAaJ6ZKoUpkjrR5F1Ftw6eiSL6+QilmgxF NdK17dLpGIUeYCaE7Yxrsi+RLppvAWejWyX5f1fOp7dGelgl8UtaFdp6NAn7mQOlvbI6 doLlMmChvu9zFqsU2FfIa2T87mvZ6MeF0B+DYtH8DM3rXFx0/tQT8P0/zuufQj474oZy 0P6peKnTuHcjPQ/VbNsuPFJ7BPmvsf18Fk4Rekepmfhl8HpzJ56uYY7WhuvfjLekN1zN Hsvw== X-Gm-Message-State: ALoCoQlCKM6DZkyIih7x3e+sl52evPFMoyqKH1kpOfG1mfZx8v9qRpZ6EIRhowDYw2SoEpekURw3 X-Received: by 10.236.101.148 with SMTP id b20mr2057290yhg.46.1407349966704; Wed, 06 Aug 2014 11:32:46 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id o69si117633yhp.6.2014.08.06.11.32.46 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Aug 2014 11:32:46 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id D670731C4A2; Wed, 6 Aug 2014 11:32:45 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21474.29901.308670.5969@ruffy.mtv.corp.google.com> Date: Wed, 06 Aug 2014 18:32:00 -0000 To: Gary Benson Cc: gdb-patches@sourceware.org, Pedro Alves , Tom Tromey Subject: Re: [PATCH 10/11 v5] Remove GDBSERVER uses from i386-dregs.c In-Reply-To: <1406888377-25795-11-git-send-email-gbenson@redhat.com> References: <1406888377-25795-1-git-send-email-gbenson@redhat.com> <1406888377-25795-11-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00116.txt.bz2 Gary Benson writes: > This commit makes nat/i386-dregs.c include common-defs.h rather than > defs.h or server.h. A couple of minor changes were required in order > to support this change. > > gdb/ > 2014-08-01 Gary Benson > > * nat/i386-dregs.c: Include common-defs.h and break-common.h. > Don't include defs.h or server.h. > (debug_hw_points): Declare unconditionally. > --- > gdb/ChangeLog | 6 ++++++ > gdb/nat/i386-dregs.c | 10 ++-------- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/gdb/nat/i386-dregs.c b/gdb/nat/i386-dregs.c > index e3272cd..7905c44 100644 > --- a/gdb/nat/i386-dregs.c > +++ b/gdb/nat/i386-dregs.c > @@ -17,13 +17,9 @@ > You should have received a copy of the GNU General Public License > along with this program. If not, see . */ > > -#ifdef GDBSERVER > -#include "server.h" > -#else > -#include "defs.h" > -#include "inferior.h" > -#endif > +#include "common-defs.h" > #include "i386-dregs.h" > +#include "break-common.h" > > /* Support for hardware watchpoints and breakpoints using the i386 > debug registers. > @@ -175,10 +171,8 @@ > /* Types of operations supported by i386_handle_nonaligned_watchpoint. */ > typedef enum { WP_INSERT, WP_REMOVE, WP_COUNT } i386_wp_op_t; > > -#ifndef GDBSERVER > /* Whether or not to print the mirrored debug registers. */ > extern int debug_hw_points; > -#endif Since externs should live in headers, and since this is a cleanup patch, can I impose on you a request to move debug_hw_points to a header. Seems like i386-dregs.h is the best place. The variable could even arguably be defined in i386-dregs.c, though I'm not sure if/how people would want i386-nat.c to change. Plus add x86 or some such to the variable's name. I'd leave this part to another pass. > > /* Print the values of the mirrored debug registers. */ > > -- > 1.7.1 >