Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andreas From <andreas.from@ericsson.com>
To: <gdb@sourceware.org>
Subject: Clarification on what a byte is in -data-*-memory-bytes ?
Date: Fri, 31 Jan 2014 22:41:00 -0000	[thread overview]
Message-ID: <52EC2698.1030300@ericsson.com> (raw)

Hi,

We're developing support for a target architecture where the smallest
addressable data type is 16-bit, i.e. the char type size is 16 bits, and 
we have

sizeof(char) = 1
sizeof(int)  = 1

The memory addresses are aligned on 16-bit boundaries and the second
octet of the contents of that memory is not addressable in itself.


In the -data-read-memory-bytes, we get a bit confused.  The "byte" is on 
our target system 16-bits, and we would like to clarify what a "byte" 
really should mean.

The COUNT and OFFSET are said to be in bytes, but does that mean that we 
would read in target bytes or in host bytes (i.e. octets) ?


Reading the old posts related to the introduction of the
-data-read-memory-bytes which this thread from June-Aug 2010

https://sourceware.org/ml/gdb-patches/2010-06/msg00571.html
https://sourceware.org/ml/gdb-patches/2010-07/msg00114.html
https://sourceware.org/ml/gdb-patches/2010-08/msg00140.html

it seems like the byte is an octet.


Also, offset and count interpreted as octets might raise questions on 
introducing a read-modify-write scheme for the first and last bytes when 
issuing the -data-write-memory-bytes command.

BR,
Andreas


             reply	other threads:[~2014-01-31 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 22:41 Andreas From [this message]
     [not found] ` <201402010035.s110Z4CR025827@new.toad.com>
2014-02-03 20:29   ` Andreas From

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=52EC2698.1030300@ericsson.com \
    --to=andreas.from@ericsson.com \
    --cc=gdb@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