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).