[maemo-developers] [maemo-developers] automatic byte order check

From: Siarhei Siamashka siarhei.siamashka at gmail.com
Date: Wed Aug 23 22:52:58 EEST 2006
On Monday 21 August 2006 10:45, Detlef Schmicker wrote:

> I had a look at the vncviewer and saw, that it is working in the sandbox
> in connection with vino (gnome vnc server). On the device the CoRRE
> encoding does not work.
> Probably it is a byte order problem. The code has a lot of byte order
> (e.g. GUINT16_TO_BE). Is there a way to automaticaly warn critical
> points at compilation? Are there any tools?

I'm not completely sure if understood your post correctly, but cpu used in 
Nokia 770 is little endian (the same as x86). So it is unlikely to have
byte order or endian problems here.

But ARM is alignment sensitive, so you may have problems because of bad
alighment, I started making a page on wiki describing this issue (still very
incomplete): http://maemo.org/maemowiki/PortingFromX86ToARM

I also tried to search for tools that could identify alignment problems
automatically, but did not find anything useful. Probably the most easy 
way to make such tool is to modify valgrind to track alignment for each
memory access operation. But don't know, I ended up finding and fixing 
such problems in my code manually without the help of any tools  :)

More information about the maemo-developers mailing list