The evaluation of expressions containing register values was broken for targets for which endianness differs from host.
This patch fixes issues like:
(lldb) reg read pc
pc = 0x00400020 arithmetic.elf`main + 32 at main.c:12
(lldb) expr -f hex -- $pc
(unsigned int) $2 = 0x20004000
Where the second command will now give the right value (0x00400020).
Let's put an lldbassert in here to make sure scalar.GetByteSize() == register_data.GetByteSize().
I know it ought to be, but I'm a little bit wary of that code.