Am 18.07.2012 10:01, schrieb Peter Maydell:
On 18 July 2012 07:30, Alexey Kardashevskiy <a...@ozlabs.ru> wrote:
1. The size of the following is 7 bytes on linux and 8 bytes on Windows:
struct {
     uint32_t hi;
     uint64_t child;
     uint64_t parent;
     uint64_t size;
} __attribute__((packed)) ranges[];

The structure is used between QEMU and Open Firmware (powerpc bios) so it is 
important.

I think this struct should use QEMU_PACKED, which will
ensure that it is packed to GCC rules rather than MS
rules.

We also seem to have let a pile of new uses of attribute((packed))
slip in in hw/mfi.h. Those are probably bugs too.

-- PMM

They are bugs (for w32 / w64 hosts). I just sent a patch to fix them.

Some more which I did not fix are in the TCG debugger interface.
Maybe those also need to be fixed for w32 / w64, but that needs
more tests and reading of the debugger interface documentation.
Maybe Richard Henderson knows whether they should use QEMU_PACKED,
too.

Regards,

Stefan W.


Reply via email to