Added a work in the DWARF parser when we parse an array that ends up having 
no elements so that they at least have 1 element. 

Added the ability to show the declaration location of variables to the 
"frame variables" with the "--show-declaration" option ("-c" for short).

Changed the "frame variables" command over to use the value object code
so that we use the same code path as the public API does when accessing and
displaying variable values.

llvm-svn: 113733
diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp
index cbd583f..fef94dc 100644
--- a/lldb/source/Core/ValueObjectVariable.cpp
+++ b/lldb/source/Core/ValueObjectVariable.cpp
@@ -133,6 +133,32 @@
             // their own values as needed. If this variable is a simple
             // type, we read all data for it into m_data.
             // Make sure this type has a value before we try and read it
+
+            // If we have a file address, convert it to a load address if we can.
+            if (value_type == Value::eValueTypeFileAddress && exe_ctx.process)
+            {
+                lldb::addr_t file_addr = m_value.GetScalar().ULongLong(LLDB_INVALID_ADDRESS);
+                if (file_addr != LLDB_INVALID_ADDRESS)
+                {
+                    SymbolContext var_sc;
+                    variable->CalculateSymbolContext(&var_sc);
+                    if (var_sc.module_sp)
+                    {
+                        ObjectFile *objfile = var_sc.module_sp->GetObjectFile();
+                        if (objfile)
+                        {
+                            Address so_addr(file_addr, objfile->GetSectionList());
+                            lldb::addr_t load_addr = so_addr.GetLoadAddress (exe_ctx.process);
+                            if (load_addr != LLDB_INVALID_ADDRESS)
+                            {
+                                m_value.SetValueType(Value::eValueTypeLoadAddress);
+                                m_value.GetScalar() = load_addr;
+                            }
+                        }
+                    }
+                }
+            }
+
             if (ClangASTContext::IsAggregateType (GetOpaqueClangQualType()))
             {
                 // this value object represents an aggregate type whose