This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Clarification on what a byte is in -data-*-memory-bytes ?


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

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]