From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19851 invoked by alias); 9 Apr 2015 08:20:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19841 invoked by uid 89); 9 Apr 2015 08:20:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout22.012.net.il Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Apr 2015 08:20:28 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NMJ007005M9Z700@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Thu, 09 Apr 2015 11:20:25 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMJ007N65U1RH70@a-mtaout22.012.net.il>; Thu, 09 Apr 2015 11:20:25 +0300 (IDT) Date: Thu, 09 Apr 2015 08:20:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 0/7] Support reading/writing memory on architectures with non 8-bits bytes In-reply-to: <1428522979-28709-1-git-send-email-simon.marchi@ericsson.com> To: Simon Marchi Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83d23dg1bd.fsf@gnu.org> References: <1428522979-28709-1-git-send-email-simon.marchi@ericsson.com> X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00314.txt.bz2 > From: Simon Marchi > CC: Simon Marchi > Date: Wed, 8 Apr 2015 15:56:12 -0400 > > On such a system, memory is addressable in atomic chunks of 16-bits. On > a "normal" system, you have 8 bits of data associated with each memory > address: > > Address Data > --------------- > 0x1000 0xaa > 0x1001 0xbb > 0x1002 0xcc > 0x1003 0xdd > > whereas on a system with 16-bits bytes, you have 16-bits of data per > address: > > Address Data > --------------- > 0x1000 0xaaaa > 0x1001 0xbbbb > 0x1002 0xcccc > 0x1003 0xdddd > > To support these systems, GDB must be modified to consider the byte size > when reading/writing memory. This is what this first patch series is > about. > > Also, on these systems, sizeof(char) == 1 == 16 bits. There is therefore > many places related to types and values handling that need to be > modified. This will be the subject of subsequent patch series. I wonder: wouldn't it be possible to keep the current "byte == 8 bits" notion, and instead to change the way addresses are interpreted by the target back-end? IOW, do we really need to expose this issue all the way to the higher levels of GDB application code?