summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-08-18 18:28:52 +0000
committerGreg Clayton <gclayton@apple.com>2010-08-18 18:28:52 +0000
commitad3843c93ba205b6c98e2995aa9666593c97d033 (patch)
tree1900524e6d0a364437b8be5f4ce0e2a8a71d70ae /lldb/source/Core
parentea480e507c3f6500fe1a25c0887eea3b85f947a9 (diff)
downloadbcm5719-llvm-ad3843c93ba205b6c98e2995aa9666593c97d033.tar.gz
bcm5719-llvm-ad3843c93ba205b6c98e2995aa9666593c97d033.zip
Changed "Error Value::GetValueAsData (...)" to set the data extractor byte
order and address size correctly when the value comes from a file address. Values have "file" addresses when they are globals and the debug information specifies that they live in the object file at a given address (DWARF will represent this as a location "DW_OP_addr <addr>"). This causes global pointers to correctly extract their children on 64 bit programs. llvm-svn: 111380
Diffstat (limited to 'lldb/source/Core')
-rw-r--r--lldb/source/Core/Value.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index a9a468880e8..77b1d50e06d 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -560,7 +560,16 @@ Value::GetValueAsData (ExecutionContext *exe_ctx, clang::ASTContext *ast_context
Address so_addr(file_addr, objfile->GetSectionList());
address = so_addr.GetLoadAddress (exe_ctx->process);
if (address != LLDB_INVALID_ADDRESS)
+ {
address_type = eAddressTypeLoad;
+ data.SetByteOrder(exe_ctx->process->GetByteOrder());
+ data.SetAddressByteSize(exe_ctx->process->GetAddressByteSize());
+ }
+ else
+ {
+ data.SetByteOrder(objfile->GetByteOrder());
+ data.SetAddressByteSize(objfile->GetAddressByteSize());
+ }
}
if (address_type == eAddressTypeFile)
error.SetErrorStringWithFormat ("%s is not loaded.\n", var_sc.module_sp->GetFileSpec().GetFilename().AsCString());
OpenPOWER on IntegriCloud