diff options
Diffstat (limited to 'lldb/source/Expression/ClangExpressionVariable.cpp')
| -rw-r--r-- | lldb/source/Expression/ClangExpressionVariable.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangExpressionVariable.cpp b/lldb/source/Expression/ClangExpressionVariable.cpp index d576578b5ef..3931cfb2e74 100644 --- a/lldb/source/Expression/ClangExpressionVariable.cpp +++ b/lldb/source/Expression/ClangExpressionVariable.cpp @@ -18,6 +18,8 @@ #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Stream.h" #include "lldb/Core/Value.h" +#include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/Process.h" using namespace lldb_private; using namespace clang; @@ -79,6 +81,12 @@ ClangExpressionVariable::Print (Stream &output_stream, DataExtractor data; Error expr_error = val.GetValueAsData (&exe_ctx, ast_context, data, 0); + + // Set byte order and pointer size to TARGET byte order and pointer size! + + data.SetByteOrder(exe_ctx.process->GetByteOrder()); + data.SetAddressByteSize(exe_ctx.process->GetAddressByteSize()); + if (!expr_error.Success ()) { err.SetErrorToGenericError (); |

