This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
string constant byte ordering
- From: Zhao Luo <lz_us at yahoo dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 15 Apr 2004 08:13:42 -0700 (PDT)
- Subject: [ECOS] string constant byte ordering
I met a problem with string constant byte ordering
when I am porting redboot to a net silicon(arm) board.
When I load the image, all the string constants are
put in little endian format in memory, for example,
A string is defined as char str[] = ?ABCD?, when I
examine the memory, from the lower address it is
?DCBA?, however, if I look at objdump of the code, it
is ABCD, If I do ?p str? in GDB then it shows ?ABCD?,
I change the definition in cyg/hal/basetypes.h, but it
doesn?t seem to have effects.
The code is running. There is no obvious anomaly other
than this. I am using JEENI and gdb. I am suspecting
it is a gdb/JEENI loading issue. But I have no idea
where I should start with.
Could some one give me some idea? I really appreciate
the help.
Thanks
Zhao
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss