Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 0/7] Support reading/writing memory on architectures with non 8-bits bytes
Date: Fri, 10 Apr 2015 18:01:00 -0000	[thread overview]
Message-ID: <55281004.8040105@ericsson.com> (raw)
In-Reply-To: <831tjrubgy.fsf@gnu.org>

On 15-04-10 01:42 PM, Eli Zaretskii wrote:
>> Date: Fri, 10 Apr 2015 12:01:00 -0400
>> From: Simon Marchi <simon.marchi@ericsson.com>
>> CC: <gdb-patches@sourceware.org>
>>
>>> 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 implemented
>> in the patches.  The length is always passed in "units of memory" of whatever 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.
> 
> 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:

  ‘count’
      The number of bytes to read. This should be an integer literal.

to something like

  ‘count’
      The number of addressable memory units to read. This should be an integer literal.

We can't use "byte", "half-words" or "words" here, since the doc should work 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-memory-bytes
>> command accepted a length in number of memory units, as long as this unit is not
>> called a byte.
> 
> 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 change it since
it's not really referred by name in the code, just the position.


  reply	other threads:[~2015-04-10 18:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 19:56 Simon Marchi
2015-04-08 19:56 ` [PATCH 6/7] remote: Consider byte size when reading/writing memory Simon Marchi
2015-04-08 19:56 ` [PATCH 2/7] Cleanup some docs about memory write Simon Marchi
2015-04-08 19:56 ` [PATCH 4/7] gdbarch: add memory_byte_size method Simon Marchi
2015-04-08 19:56 ` [PATCH 7/7] MI: Consider byte size when reading/writing memory Simon Marchi
2015-04-08 19:56 ` [PATCH 3/7] Clarify doc about memory read/write and non-8-bits bytes Simon Marchi
2015-04-09  7:02   ` Eli Zaretskii
2015-04-08 19:56 ` [PATCH 5/7] target: consider byte size when reading/writing memory Simon Marchi
2015-04-08 19:56 ` [PATCH 1/7] Various cleanups in target read/write code Simon Marchi
2015-04-09  8:20 ` [PATCH 0/7] Support reading/writing memory on architectures with non 8-bits bytes Eli Zaretskii
2015-04-09 15:39   ` Simon Marchi
2015-04-09 16:29     ` Eli Zaretskii
2015-04-09 21:00       ` Simon Marchi
2015-04-10  8:11         ` Eli Zaretskii
2015-04-10 16:01           ` Simon Marchi
2015-04-10 16:35             ` Pedro Alves
2015-04-10 16:39             ` Paul_Koning
2015-04-10 17:34               ` Simon Marchi
2015-04-10 17:42             ` Eli Zaretskii
2015-04-10 18:01               ` Simon Marchi [this message]
2015-04-10 18:16                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55281004.8040105@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox