From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10406 invoked by alias); 17 Jul 2014 09:02:18 -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 10393 invoked by uid 89); 17 Jul 2014 09:02:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 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-vc0-f174.google.com Received: from mail-vc0-f174.google.com (HELO mail-vc0-f174.google.com) (209.85.220.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 17 Jul 2014 09:02:16 +0000 Received: by mail-vc0-f174.google.com with SMTP id la4so3875586vcb.5 for ; Thu, 17 Jul 2014 02:02:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=eJ9Hd0HcgQkffRSuFqZYYQskLfdBfx1r+ydCJWexMDU=; b=AlgZ6n0kFS+3wa5Ofg28uJGNapAllEauEIyiQDmsG61cnD8M29bBRtWkLNSMFp+9iV SbLsFYpCvT5ZJZxzcSQHxzWZZRWfdh83oT6bKEMk0nZ/bis6bgmSXe5qnxJ7j8XFQA/l ZzxPc96WfkGmI/3y7nZGKpZwxQnef5skFMMkL0SLLTiBkO027z+57BauaeK4Tt4VncRW IstHHgMq14OhHbc8S1fcJ0bWSpaCIyM6z2ZDlufA/oQjWp0bFE4wFep/qK6s1rcJ70P1 i4l58v7bNmHFOXaIQRluGNzv9Cu7fFR0S7EalpY5P6ntVlRnMNAmjZxjMIrnX4JiNsqc tMIw== X-Gm-Message-State: ALoCoQlMWh6J5mb7uv9uXDn+STIQ0PRCyFmzCvZSEJtYFI9rE49i9Wpb+ndI+08kwdcWAax0AxBl MIME-Version: 1.0 X-Received: by 10.52.157.41 with SMTP id wj9mr30603778vdb.1.1405587734202; Thu, 17 Jul 2014 02:02:14 -0700 (PDT) Received: by 10.52.28.233 with HTTP; Thu, 17 Jul 2014 02:02:14 -0700 (PDT) In-Reply-To: <1405520243-17282-5-git-send-email-gbenson@redhat.com> References: <1405520243-17282-1-git-send-email-gbenson@redhat.com> <1405520243-17282-5-git-send-email-gbenson@redhat.com> Date: Thu, 17 Jul 2014 11:21:00 -0000 Message-ID: Subject: Re: [PATCH 04/15 v2] Introduce common-types.h From: Doug Evans To: Gary Benson Cc: gdb-patches , Tom Tromey Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00456.txt.bz2 On Wed, Jul 16, 2014 at 7:17 AM, Gary Benson wrote: > This introduces common-types.h. This file defines various standard > types used by gdb and gdbserver. > > 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-07-16 Tom Tromey > Gary Benson > > * common/common-types.h: New file. > * nat/linux-ptrace.c: Include common-types.h. > * defs.h: Include common-types.h. > (gdb_byte, CORE_ADDR, CORE_ADDR_MAX, LONGEST, ULONGEST): Remove. > > gdb/gdbserver/ > 2014-07-16 Tom Tromey > > * server.h: Include common-types.h. Move gdb_assert.h include > earlier. Add static assertion. > (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove. LGTM One nit for discussion's sake. CORE_ADDR for gdbserver is a native value, whereas in gdb it's a target value. That's why the static assert (sizeof (CORE_ADDR) >= sizeof (void *)) isn't in common code (IIUC - e.g., consider a 64-cross-32 gdb). I don't think that'll ever be a problem, and if it does become one we can address it then. Just thinking out loud ...