Got a lot of the kinks worked out in the inline support after debugging more
complex inlined examples.

StackFrame classes don't have a "GetPC" anymore, they have "GetFrameCodeAddress()".
This is because inlined frames will have a PC value that is the same as the 
concrete frame that owns the inlined frame, yet the code locations for the
frame can be different. We also need to be able to get the real PC value for
a given frame so that variables evaluate correctly. To get the actual PC
value for a frame you can use:

    addr_t pc = frame->GetRegisterContext()->GetPC();

Some issues with the StackFrame stomping on its own symbol context were 
resolved which were causing the information to change for a frame when the
stack ID was calculated. Also the StackFrame will now correctly store the
symbol context resolve flags for any extra bits of information that were 
looked up (if you ask for a block only and you find one, you will alwasy have
the compile unit and function).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/Block.cpp b/source/Symbol/Block.cpp
index 8256aa7..c0b9ac6 100644
--- a/source/Symbol/Block.cpp
+++ b/source/Symbol/Block.cpp
@@ -24,7 +24,7 @@
     m_children (),
     m_ranges (),
     m_inlineInfoSP (),
-    m_variables (),
+    m_variable_list_sp (),
     m_parsed_block_info (false),
     m_parsed_block_variables (false),
     m_parsed_child_blocks (false)
@@ -104,9 +104,9 @@
     {
         s->IndentMore();
 
-        if (m_variables.get())
+        if (m_variable_list_sp.get())
         {
-            m_variables->Dump(s, show_context);
+            m_variable_list_sp->Dump(s, show_context);
         }
 
         for (Block *child_block = GetFirstChild(); child_block != NULL; child_block = child_block->GetSibling())
@@ -137,7 +137,7 @@
 }
 
 void
-Block::CalculateSymbolContext(SymbolContext* sc)
+Block::CalculateSymbolContext (SymbolContext* sc)
 {
     if (m_parent_scope)
         m_parent_scope->CalculateSymbolContext(sc);
@@ -149,7 +149,7 @@
 {
     Block* parent_block = GetParent();
 
-    InlineFunctionInfo* inline_info = InlinedFunctionInfo ();
+    const InlineFunctionInfo* inline_info = InlinedFunctionInfo ();
     if (inline_info)
     {
         const Declaration &call_site = inline_info->GetCallSite();
@@ -226,7 +226,15 @@
 }
 
 Block *
-Block::GetInlinedParent () const
+Block::GetContainingInlinedBlock ()
+{
+    if (InlinedFunctionInfo())
+        return this;
+    return GetInlinedParent ();
+}
+
+Block *
+Block::GetInlinedParent ()
 {
     Block *parent_block = GetParent ();
     if (parent_block)
@@ -241,6 +249,20 @@
 
 
 bool
+Block::GetRangeContainingOffset (const addr_t offset, VMRange &range)
+{
+    uint32_t range_idx = VMRange::FindRangeIndexThatContainsValue (m_ranges, offset);
+    if (range_idx < m_ranges.size())
+    {
+        range = m_ranges[range_idx];
+        return true;
+    }
+    range.Clear();
+    return false;
+}
+
+
+bool
 Block::GetRangeContainingAddress (const Address& addr, AddressRange &range)
 {
     SymbolContext sc;
@@ -278,18 +300,6 @@
     m_ranges.back().Reset(start_offset, end_offset);
 }
 
-InlineFunctionInfo*
-Block::InlinedFunctionInfo ()
-{
-    return m_inlineInfoSP.get();
-}
-
-const InlineFunctionInfo*
-Block::InlinedFunctionInfo () const
-{
-    return m_inlineInfoSP.get();
-}
-
 // Return the current number of bytes that this object occupies in memory
 size_t
 Block::MemorySize() const
@@ -297,20 +307,12 @@
     size_t mem_size = sizeof(Block) + m_ranges.size() * sizeof(VMRange);
     if (m_inlineInfoSP.get())
         mem_size += m_inlineInfoSP->MemorySize();
-    if (m_variables.get())
-        mem_size += m_variables->MemorySize();
+    if (m_variable_list_sp.get())
+        mem_size += m_variable_list_sp->MemorySize();
     return mem_size;
 
 }
 
-Block *
-Block::GetFirstChild () const
-{
-    if (m_children.empty())
-        return NULL;
-    return m_children.front().get();
-}
-
 void
 Block::AddChild(const BlockSP &child_block_sp)
 {
@@ -343,7 +345,7 @@
     VariableListSP variable_list_sp;
     if (m_parsed_block_variables == false)
     {
-        if (m_variables.get() == NULL && can_create)
+        if (m_variable_list_sp.get() == NULL && can_create)
         {
             m_parsed_block_variables = true;
             SymbolContext sc;
@@ -353,11 +355,11 @@
         }
     }
 
-    if (m_variables.get())
+    if (m_variable_list_sp.get())
     {
         variable_list_sp.reset(new VariableList());
         if (variable_list_sp.get())
-            variable_list_sp->AddVariables(m_variables.get());
+            variable_list_sp->AddVariables(m_variable_list_sp.get());
 
         if (get_child_variables)
         {
@@ -406,13 +408,6 @@
     return num_variables_added;
 }
 
-
-void
-Block::SetVariableList(VariableListSP& variables)
-{
-    m_variables = variables;
-}
-
 void
 Block::SetBlockInfoHasBeenParsed (bool b, bool set_children)
 {