From: toemoss garcia <toemossgarcia@gmail.com>
To: gdb@sourceware.org
Subject: ARM BE8 support is broken
Date: Thu, 19 Nov 2015 18:12:00 -0000 [thread overview]
Message-ID: <CALRw1GG+n38ADxzp9tqyPJr2BVD9vrvg-FnhQ5mGs7F76KAuwQ@mail.gmail.com> (raw)
Hi gdb-experts,
I've been having quite a headache working with GDB on
a (proprietary) mixed-endian processor that is built around a ARM
cortexm3 using arm's BE8 big endian variant. If you don't know,
BE8 architecture treats instructions as little endian and data as
big endian. The additional wrinkle is that anything in the system
control memory space (0xE000E000-0xE000F000) and the external
private peripheral bus (0xE0000000-0xE00FFFFF) is *also* treated
as little endian [1]. At least for the cortex-m.
There has been *some* support added for BE8 in GDB, but as far as
I can tell, all the patches do is treat everything as BE and
manually swap instructions to LE (see [2] for the patch
submission). This only seems to effect doing a ``load`` or when
reading a memory address as an instruction. There doesn't seem to
be any actual support for correctly reading/writing memory based
on the region of memory space. IOW, the only thing you can do
reliably for BE8 is load a program to the core (this seems to
always work correctly for BE8 images).
Is there anything in the works/any interest in getting this kind
of support added?
Does anybody have experience using BE8 with GDB? How did
you "solve" this?
[1] The definitive guide to the ARM Cortex-M3
Page 97 (section 5.8) on this version:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CB4QFjAAahUKEwiLyoqo85zJAhVFGz4KHbl9Czc&url=http%3A%2F%2Fwww.eecs.umich.edu%2Fcourses%2Feecs373%2FlabsW14%2Frefs%2FM3%2520Guide.pdf&usg=AFQjCNHjnoQZ3Bcn-4DXFQ04gffVMs-g0A&sig2=P34NEAewY9kHxo53v8IO1g
[2] Subject: [RFA] ARM BE8 support
https://sourceware.org/ml/gdb-patches/2008-08/msg00052.html
next reply other threads:[~2015-11-19 18:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 18:12 toemoss garcia [this message]
2015-11-20 9:03 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALRw1GG+n38ADxzp9tqyPJr2BVD9vrvg-FnhQ5mGs7F76KAuwQ@mail.gmail.com \
--to=toemossgarcia@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox