From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54756 invoked by alias); 19 Apr 2017 10:31:34 -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 54701 invoked by uid 89); 19 Apr 2017 10:31:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 10:31:30 +0000 Received: by mail-wm0-f45.google.com with SMTP id m123so7885184wma.0 for ; Wed, 19 Apr 2017 03:31:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=tdJMZb2WdY/oTXl3LySh34GduU5fJa6ZtbjoQTD2wYA=; b=DrhsjLaaFc5WpLgPErlDF+WVj7Ad8P4ml3z8JLIKKis1Ss9diiy8oNHTaG/YKO7yqt 1NratAnnYtCzCWAZmjauMuT5rI1C8iJMxx7W8Hu4ywXXKJ2tgHyahYE4AQdZxD/ph/eM Ly9DzQQwnk89sOQDatWPgL+liNACuWHQ+4N9IGm2c1sosf3v3aVLkPrffvf+djyblJzy nhCO/1LrfOUcss21AZ/FsL1uJWjRCn5phIiBISmB8sVjumBIv0PWvJd22nRfmC4lrZ4H F6XgNRTM8Hf9lWwmbZ43imUE24itVh7daiVvrS4pwSvXSV2fMLjj2BLhQ7ASIPKizkvg /KFA== X-Gm-Message-State: AN3rC/7iO6O6itRYSs6P/AttQhtbzHTLyMetrKG+X+qvP+p9ELAL32tZ +Ki7pFfvatdddo+O/Oi9+Q== X-Received: by 10.28.134.66 with SMTP id i63mr18329335wmd.84.1492597889949; Wed, 19 Apr 2017 03:31:29 -0700 (PDT) Received: from [192.168.0.101] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id i71sm2754343wri.0.2017.04.19.03.31.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 03:31:29 -0700 (PDT) Subject: Re: [PATCH 1/4] Change field separator in gdbarch.sh To: Simon Marchi References: <20170416141430.2585-1-simon.marchi@polymtl.ca> <20170416141430.2585-2-simon.marchi@polymtl.ca> <1e5568c8-eead-c0b1-8b34-736b9b6ff5d0@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Wed, 19 Apr 2017 10:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg00556.txt.bz2 On 04/19/2017 05:03 AM, Simon Marchi wrote: > On 2017-04-18 16:20, Pedro Alves wrote: >> On 04/16/2017 03:14 PM, Simon Marchi wrote: >>> --- a/gdb/gdbarch.h >>> +++ b/gdb/gdbarch.h >>> @@ -129,7 +129,7 @@ extern void set_gdbarch_bits_big_endian (struct >>> gdbarch *gdbarch, int bits_big_e >>> >>> /* Number of bits in a char or unsigned char for the target machine. >>> Just like CHAR_BIT in but describes the target machine. >>> - v:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: >>> + v;TARGET_CHAR_BIT;int;char_bit;;;;8 * sizeof (char);8;;0; >> >> BTW, do you know why does this bit appear in the .h file in the >> first place? > > It's in gdbarch.h because gdbarch.sh thinks it's part of the comment > above short_bit, so it gets copied verbatim to the .h. Ah, it's commented out in gdbarch.sh. I hadn't looked, and confused it with the gdbarch hook you had added before. But this is something much older than that. > I don't know why > it's there though. It seems like it's been there for a really long > time, but has always been commented out. I had not seen it before doing > this patch, and didn't worry too much about it. > > Perhaps it was seen as a possible extension in case someone would bother > adding support for targets with non-8-bit-bytes? Yeah, that looks like it. > If so, the addressable_memory_unit_size method kind of took that place. Guess we should just delete that commented out hook. > > Any better guess? No. Thanks, Pedro Alves