This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/7] Support reading/writing memory on architectures with non 8-bits bytes
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 09 Apr 2015 11:20:38 +0300
- Subject: Re: [PATCH 0/7] Support reading/writing memory on architectures with non 8-bits bytes
- Authentication-results: sourceware.org; auth=none
- References: <1428522979-28709-1-git-send-email-simon dot marchi at ericsson dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Simon Marchi <simon.marchi@ericsson.com>
> CC: Simon Marchi <simon.marchi@ericsson.com>
> 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?