[lldb-dev] Registers in expressions on big endian target

Zdenek Prikryl via lldb-dev lldb-dev at lists.llvm.org
Fri May 4 00:24:45 PDT 2018


Is anybody familiar with (De)materializer in the expressions for 
registers? I'm facing really weird behavior. I have big endian target 
and if I do register read, I got the correct results (e.g. 0x11223344), 
but if I do print <reg>, I got 0x44332211. It seems that the 
EntityRegister swap bytes when Materialize() is handled, but it's not 
swapped again during Dematerialize(). It's really unfortunate, because I 
cannot use registers in expressions for breakpoints etc. (the result is 
always wrong).

Note that little endian targets are fine.

Any thoughts how it should be properly fixed?

Zdenek Prikryl

More information about the lldb-dev mailing list