From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43572 invoked by alias); 21 May 2015 17:46:11 -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 43560 invoked by uid 89); 21 May 2015 17:46:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 May 2015 17:46:10 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id E4FE9293313; Thu, 21 May 2015 17:46:08 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4LHk6RM019164; Thu, 21 May 2015 13:46:08 -0400 Message-ID: <555E19DE.2030706@redhat.com> Date: Thu, 21 May 2015 17:46:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH v2 4/7] gdbarch: add addressable_memory_unit_size method References: <1429127258-1033-1-git-send-email-simon.marchi@ericsson.com> <1429127258-1033-5-git-send-email-simon.marchi@ericsson.com> In-Reply-To: <1429127258-1033-5-git-send-email-simon.marchi@ericsson.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00548.txt.bz2 On 04/15/2015 08:47 PM, Simon Marchi wrote: > Add a new gdbarch method to get the length of an addressable memory unit > for a given architecture. The default implementation returns 1. > > --- a/gdb/gdbarch.sh > +++ b/gdb/gdbarch.sh > @@ -1109,6 +1109,11 @@ m:char *:gcc_target_options:void:::default_gcc_target_options::0 > # returns the BFD architecture name, which is correct in nearly every > # case. > m:const char *:gnu_triplet_regexp:void:::default_gnu_triplet_regexp::0 > + > +# Return the size in bytes of an addressable memory unit on this architecture. > +# This corresponds to the number of bytes associated to each address in memory. > +m:int:addressable_memory_unit_size:void:::default_addressable_memory_unit_size::0 This is the central place everyone should look at first to understand non 8-bit bytes targets. For extra clarity, could you please add "8-bit"s in there, say: "the size in 8-bit bytes" (...) to the number of 8-bit bytes associated to each address in memory." Looks good to me with that change. Thanks, Pedro Alves