public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* ARM BE8 support is broken
@ 2015-11-19 18:12 toemoss garcia
  2015-11-20  9:03 ` Yao Qi
  0 siblings, 1 reply; 2+ messages in thread
From: toemoss garcia @ 2015-11-19 18:12 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ARM BE8 support is broken
  2015-11-19 18:12 ARM BE8 support is broken toemoss garcia
@ 2015-11-20  9:03 ` Yao Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Yao Qi @ 2015-11-20  9:03 UTC (permalink / raw)
  To: toemoss garcia; +Cc: gdb

toemoss garcia <toemossgarcia@gmail.com> writes:

Hi,

> 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).

It is known that there are some bugs in GDB for ARM BE8.

>
> Is there anything in the works/any interest in getting this kind
> of support added?

Last year, Victor Kamensky from linaro posted some patches for ARM BE8,
and some patches were committed.  However, looks he stopped working on
this.  This is the only effort related to ARM BE8 which I am aware of.

>
> Does anybody have experience using BE8 with GDB? How did
> you "solve" this?

No, I don't have experience using BE8, all my arm boards are little
endian.  If you want to fix them, patches are welcome.  You can also
post your problems here, and people are happy to help you.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-20  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19 18:12 ARM BE8 support is broken toemoss garcia
2015-11-20  9:03 ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).