[lldb-dev] [PATCH] Saving expression results in correct byte order

Félix Cloutier felixcca at yahoo.ca
Sun Sep 15 10:36:50 PDT 2013


I sent this about a week ago, but I did it so unceremoniously that it has probably fallen under the radar.

This patch fixes an issue where expression results are saved in host byte order rather than in target byte order. It only modifies source/Expression/IRInterpreter.cpp.

DISCLAIMER: when I tried to run the tests, I got this message:

> This script requires lldb.py to be in either /Users/felix/Projets/OpenSource/lldb/build/Debug/LLDB.framework/Resources/Python, /Users/felix/Projets/OpenSource/lldb/build/Release/LLDB.framework/Resources/Python, or /Users/felix/Projets/OpenSource/lldb/build/BuildAndIntegration/LLDB.framework/Resources/Python

So I naively tested `int $x = 0x01020304;` on my target with a different byte order and on a native program, and both cases work. I also tried `int $x[2] = {0x0102, 0x0203};` and it does not work (it creates a zeroed array of 2 elements), but it came to my attention that it also doesn't work with the release of lldb that ships with Xcode, so I don't think it's due to this change.

Félix

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130915/96a48414/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FixExpressionEndianness.diff
Type: application/octet-stream
Size: 1437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130915/96a48414/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130915/96a48414/attachment-0001.html>


More information about the lldb-dev mailing list