This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Clarification on what a byte is in -data-*-memory-bytes ?
- From: Andreas From <andreas dot from at ericsson dot com>
- To: John Gilmore <gnu at toad dot com>, <gdb at sourceware dot org>
- Date: Mon, 3 Feb 2014 15:28:58 -0500
- Subject: Re: Clarification on what a byte is in -data-*-memory-bytes ?
- Authentication-results: sourceware.org; auth=none
- References: <52EC2698 dot 1030300 at ericsson dot com> <201402010035 dot s110Z4CR025827 at new dot toad dot com>
(NOTE: I didn't see this previous mail reaching the GDB mailing list.
Has there been some problem lately with lost messages or can there be
some delay before mails hit the archives for some reason?)
On 14-01-31 07:35 PM, John Gilmore wrote:
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...
I don't think GDB has ever been ported to a machine without 8-bit bytes.
So some generalization would probably need to be added at the heart of GDB.
This is not for the faint of heart. It is complicated by the likelihood
that you are cross-debugging (a machine with 16-bit addresses probably
can't run GDB natively), so you'll be dealing with two byte sizes,
the target's and the host's.
We have ported GDB to this architecture, and you're right, the target
cannot run GDB natively and it needs a stub of its own. The separation
into host bytes and target bytes internally on client side might not be
trivial, but we have most things working related to such 16-bit issues.
Is this a DSP? Why did someone build a processor without byte
addressing? If you are intent on using an unusual processor, you
might not get much leverage from our free tools; you might have to
write your own tools from scratch. Good luck!
Yes, the processing is on a multicore/DSP architecture. I don't know the
history of the architecture that well to know the reasoning behind going
for 16-bit. We are one of the very few along with some off the shelf
commercial DSPs / architectures out there using something else than
8-bit, e.g. TI's C54x family and OnSemi's Belasigna 250 (24-bit audio
DSPs) and even the unlikely DCPU-16 (virtual HW for the computer
terminals inside the Mojang game 0x10c that won't ever be released?!).
John Gilmore
PS: There are some free emulators that can deal with strange byte
sizes and addressing (such as in emulating ancient computers). See,
for example, http://ibm1130.org/sim which emulates a machine with
16-bit addressing of 16-bit words. See also:
http://simh.trailing-edge.com/ I don't know of cross-debuggers for the
code that runs inside these simulators, but maybe they exist.