HOWTO-Debug-Endian-Issues

From ScummVM :: Wiki
Revision as of 03:43, 26 November 2012 by Digitall (talk | contribs) (Add first draft version of Debug-Endian-Issues HOWTO)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

As most desktop machines are now little-endian i.e. x86, debugging endian bugs is difficult.
Since (as of Q4 2012) all common big-endian machines are not desktop systems e.g. Wii, getting run-time debug information from them is problematic and slow. The only solution available generally was to set up a legacy big-endian machine, which would generally also be very problematic and slow.

Apart from auditing the codebase for known non-portable code constructs as per Coding_Conventions#Endianess_issues, without a working test machine to replicate the issue and debug with, fixing these bugs can prove impossible.

This page details a solution to this by using a virtual machine software package to emulate a machine with a different endian CPU to the host system.

QEMU

GXemul