From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82911 invoked by alias); 10 Apr 2015 18:01:45 -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 82899 invoked by uid 89); 10 Apr 2015 18:01:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg20.ericsson.net Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 10 Apr 2015 18:01:44 +0000 Received: from EUSAAHC003.ericsson.se (Unknown_Domain [147.117.188.81]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id 31.4D.12456.869B7255; Fri, 10 Apr 2015 13:52:09 +0200 (CEST) Received: from [142.133.110.232] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.83) with Microsoft SMTP Server id 14.3.210.2; Fri, 10 Apr 2015 14:01:40 -0400 Message-ID: <55281004.8040105@ericsson.com> Date: Fri, 10 Apr 2015 18:01:00 -0000 From: Simon Marchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eli Zaretskii CC: Subject: Re: [PATCH 0/7] Support reading/writing memory on architectures with non 8-bits bytes References: <1428522979-28709-1-git-send-email-simon.marchi@ericsson.com> <83d23dg1bd.fsf@gnu.org> <55269D1A.3080902@ericsson.com> <83vbh5e04f.fsf@gnu.org> <5526E87D.3020109@ericsson.com> <838ue0v1vy.fsf@gnu.org> <5527F3BC.3030005@ericsson.com> <831tjrubgy.fsf@gnu.org> In-Reply-To: <831tjrubgy.fsf@gnu.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00404.txt.bz2 On 15-04-10 01:42 PM, Eli Zaretskii wrote: >> Date: Fri, 10 Apr 2015 12:01:00 -0400 >> From: Simon Marchi >> CC: >> >>> I want GDB to be agnostic, as far as possible, to the size of 1 unit >>> of memory. Ideally, one unit will start as one unit in user-level >>> commands, pass all the way down to the target level, which should know >>> what one unit means. >> >> I totally agree with you, and I believe that's the idea you'll find impl= emented >> in the patches. The length is always passed in "units of memory" of wha= tever you >> are trying to read or write. The only thing is that I called a "unit of= memory" >> a "byte", which seems the friction point. If it's just a wording issue,= it can >> be changed easily. I just don't know what succinct term to use. >=20 > W could use the terminology that is already in use: "half-words" for > 16 bits and "words" for 32 bits. Would that be OK? When you know what is the size of the data unit you are referring to that's= fine. But we need another word or expression for when we don't know it. For example,= in the -data-read-memory-bytes documentation, we would need to change: =91count=92 The number of bytes to read. This should be an integer literal. to something like =91count=92 The number of addressable memory units to read. This should be an int= eger literal. We can't use "byte", "half-words" or "words" here, since the doc should wor= k for all the platforms. We could also use "addressable memory unit" or "unit of address= resolution", it just seems a bit verbose to me. >> Ok, so if I understand correctly, you would be fine if the -data-read-me= mory-bytes >> command accepted a length in number of memory units, as long as this uni= t is not >> called a byte. >=20 > Yes. Though it's unfortunate that the name of the command explicitly > mentions "bytes". There is also the parameter named byte-offset. Although I guess we could ch= ange it since it's not really referred by name in the code, just the position.