[Lldb-commits] [lldb] r111380 - /lldb/trunk/source/Core/Value.cpp
Greg Clayton
gclayton at apple.com
Wed Aug 18 11:28:52 PDT 2010
Author: gclayton
Date: Wed Aug 18 13:28:52 2010
New Revision: 111380
URL: http://llvm.org/viewvc/llvm-project?rev=111380&view=rev
Log:
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.
Modified:
lldb/trunk/source/Core/Value.cpp
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=111380&r1=111379&r2=111380&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Wed Aug 18 13:28:52 2010
@@ -560,7 +560,16 @@
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());
More information about the lldb-commits
mailing list