From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4416 invoked by alias); 13 Jun 2013 14:44:35 -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 4404 invoked by uid 89); 13 Jun 2013 14:44:35 -0000 X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 13 Jun 2013 14:44:35 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5DEiWq2003052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jun 2013 10:44:32 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5DEiUKg006920; Thu, 13 Jun 2013 10:44:31 -0400 Message-ID: <51B9DACE.6040803@redhat.com> Date: Thu, 13 Jun 2013 16:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] MIPS h/w watchpoint in GDBserver References: <1369881867-11372-1-git-send-email-yao@codesourcery.com> <1369881867-11372-4-git-send-email-yao@codesourcery.com> <51B9468A.5070900@codesourcery.com> In-Reply-To: <51B9468A.5070900@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00314.txt.bz2 On 06/13/2013 05:11 AM, Yao Qi wrote: > On 05/30/2013 10:44 AM, Yao Qi wrote: >> @@ -20,6 +20,7 @@ >> #include "linux-low.h" >> >> #include >> +#include "mips-linux-watch.h" >> #include >> >> #include "gdb_proc_service.h" > > Pedro mentioned that there are "unexplained odd placements for > includes", however, the only 'oddity' I can see is the order of include > mips-linux-watch.h and endian.h. In this version, I exchange the order > of them. Thanks. Yes, that's the oddity I was referring to, specifically: #include #include "local header" #include #include "local header" IMO, it's better to keep system header includes all together, and local includes all together (though we're not that good at doing that). With that in mind, given the odd placement for "mips-linux-watch.h" between two system headers, I wondered whether there was something in "mips-linux-watch.h" or that made that particular placement necessary, and if so, that should be explained, hence my "unexplained". (IMO2, I'd go as far as saying that it's better to put system includes after local includes, in order to prevent hidden dependencies in our headers, following the principle that headers should be self contained, but pull in the least dependencies possible with forward declarations for opaque types, etc., and compileable on their own.) -- Pedro Alves