From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23630 invoked by alias); 31 Jan 2014 22:41:39 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 23620 invoked by uid 89); 31 Jan 2014 22:41:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_20,SPF_PASS autolearn=ham version=3.3.2 X-HELO: sesbmg20.ericsson.net Received: from sesbmg20.ericsson.net (HELO sesbmg20.ericsson.net) (193.180.251.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 31 Jan 2014 22:41:37 +0000 Received: from ESESSHC018.ericsson.se (Unknown_Domain [153.88.253.124]) by sesbmg20.ericsson.net (Symantec Mail Security) with SMTP id 28.2B.04249.C962CE25; Fri, 31 Jan 2014 23:41:32 +0100 (CET) Received: from [142.133.111.111] (153.88.183.153) by smtps.internal.ericsson.com (153.88.183.72) with Microsoft SMTP Server (TLS) id 14.2.347.0; Fri, 31 Jan 2014 23:41:31 +0100 Message-ID: <52EC2698.1030300@ericsson.com> Date: Fri, 31 Jan 2014 22:41:00 -0000 From: Andreas From User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Subject: Clarification on what a byte is in -data-*-memory-bytes ? Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00046.txt.bz2 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