Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Clarification on what a byte is in -data-*-memory-bytes ?
@ 2014-01-31 22:41 Andreas From
       [not found] ` <201402010035.s110Z4CR025827@new.toad.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas From @ 2014-01-31 22:41 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-03 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-31 22:41 Clarification on what a byte is in -data-*-memory-bytes ? Andreas From
     [not found] ` <201402010035.s110Z4CR025827@new.toad.com>
2014-02-03 20:29   ` Andreas From

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox