From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17651 invoked by alias); 6 Aug 2014 16:34:48 -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 17641 invoked by uid 89); 6 Aug 2014 16:34:47 -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-pa0-f74.google.com Received: from mail-pa0-f74.google.com (HELO mail-pa0-f74.google.com) (209.85.220.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 06 Aug 2014 16:34:46 +0000 Received: by mail-pa0-f74.google.com with SMTP id lj1so697421pab.1 for ; Wed, 06 Aug 2014 09:34:44 -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=6hOOsfSnufCXnwJ/DGHqkgCvOoV2ovb93EZT5EFVx2w=; b=fvSgARGYhTHs6lF1M6Ih6EtArt4jwy4jo8mWG6prPuu9zZLJ3DUUMQpDnL4M0N81Jh dsHLZiRlseEKDVszpVtRqC3mIoxiRNvNV9hyhsg4KwK+5eRcACRFg/U0w+1kJnHvqOy8 XXinP84l1X6Pm9hatWn3cdNolZpBNn1VwdAbz9xKv88AQZJKOgSoN2js+F9B6sNKCxbq +ANeyvjqmFKw2+mz3dHOFITAM35EapTUWYRTWYLcCOalErUaW6qzJDvi1s3Wi2Cra0hM mh2CyFD2zcErDYpoa1hxyZWisZNmHqG8WWPbvolHRuGpO2060beQiaD0AJeomJLnIMG7 kKJg== X-Gm-Message-State: ALoCoQlMHvYABxSguontFNnCLuXOmzjJEc6IVee9foEpfMYCjghHo+BE6cKbx8kmWWDJW4zXG6QB X-Received: by 10.66.218.162 with SMTP id ph2mr6189644pac.3.1407342884627; Wed, 06 Aug 2014 09:34:44 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id z50si95761yhb.3.2014.08.06.09.34.44 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Aug 2014 09:34:44 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id B40A05A446D; Wed, 6 Aug 2014 09:34:43 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21474.22819.191021.27602@ruffy.mtv.corp.google.com> Date: Wed, 06 Aug 2014 16:34:00 -0000 To: Gary Benson Cc: gdb-patches@sourceware.org, Pedro Alves , Tom Tromey Subject: Re: [PATCH 02/11 v5] Introduce common-types.h In-Reply-To: <1406888377-25795-3-git-send-email-gbenson@redhat.com> References: <1406888377-25795-1-git-send-email-gbenson@redhat.com> <1406888377-25795-3-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00097.txt.bz2 Gary Benson writes: > This introduces common-types.h. This file defines various standard > types used by gdb and gdbserver. Side discussion: It's a bit odd to see common-types.h and then see errors.h spelled as errors.h and not common-errors.h. [Or vice versa.] Is consistency in the file names a goal? I realize common-utils.h needs to be something other than utils.h because gdb and gdbserver each still have their own. And similarly for common-defs.h - gdb still has defs.h. But nothing else in common/ is spelled common-foo, and I wonder if less randomness would be useful. I'd be happy with #include "common/errors.h", and so on. That way when I see it used I know where to look without having to rely on memory or ls. > Currently these types are conditionally defined based on GDBSERVER. > The long term goal is to remove all such tests; however, this is > difficult as currently gdb uses definitions from BFD. In the meantime > this is still a step in the right direction. > > gdb/ > 2014-08-01 Tom Tromey > Gary Benson > > * common/common-types.h: New file. > * Makefile.in (HFILES_NO_SRCDIR): Add common/common-types.h. > * common/common-defs.h: Include common-types.h. > * defs.h (gdb_byte, CORE_ADDR, CORE_ADDR_MAX, LONGEST) > (ULONGEST): Remove. > > gdb/gdbserver/ > 2014-08-01 Tom Tromey > Gary Benson > > * server.h: Add static assertion. > (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove. >[...] > diff --git a/gdb/common/common-types.h b/gdb/common/common-types.h > new file mode 100644 > index 0000000..9fa1c24 > --- /dev/null > +++ b/gdb/common/common-types.h > @@ -0,0 +1,61 @@ > +/* Declarations for common types. > + > + Copyright (C) 1986-2014 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#ifndef COMMON_TYPES_H > +#define COMMON_TYPES_H Nit, and I do mean nit :-): errors.h uses COMMON_ERRORS_H, so should this be COMMON_COMMON_TYPES_H?