Converted the lldb_private::Process over to use the intrusive
shared pointers.

Changed the ExecutionContext over to use shared pointers for
the target, process, thread and frame since these objects can
easily go away at any time and any object that was holding onto
an ExecutionContext was running the risk of using a bad object.

Now that the shared pointers for target, process, thread and
frame are just a single pointer (they all use the instrusive
shared pointers) the execution context is much safer and still
the same size. 

Made the shared pointers in the the ExecutionContext class protected
and made accessors for all of the various ways to get at the pointers,
references, and shared pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectDisassemble.cpp b/source/Commands/CommandObjectDisassemble.cpp
index 8115a87..5c7b485 100644
--- a/source/Commands/CommandObjectDisassemble.cpp
+++ b/source/Commands/CommandObjectDisassemble.cpp
@@ -314,15 +314,16 @@
     else
     {
         AddressRange range;
+        StackFrame *frame = exe_ctx.GetFramePtr();
         if (m_options.frame_line)
         {
-            if (exe_ctx.frame == NULL)
+            if (frame == NULL)
             {
                 result.AppendError ("Cannot disassemble around the current line without a selected frame.\n");
                 result.SetStatus (eReturnStatusFailed);
                 return false;
             }
-            LineEntry pc_line_entry (exe_ctx.frame->GetSymbolContext(eSymbolContextLineEntry).line_entry);
+            LineEntry pc_line_entry (frame->GetSymbolContext(eSymbolContextLineEntry).line_entry);
             if (pc_line_entry.IsValid())
             {
                 range = pc_line_entry.range;
@@ -335,13 +336,13 @@
         }
         else if (m_options.cur_function)
         {
-            if (exe_ctx.frame == NULL)
+            if (frame == NULL)
             {
                 result.AppendError ("Cannot disassemble around the current function without a selected frame.\n");
                 result.SetStatus (eReturnStatusFailed);
                 return false;
             }
-            Symbol *symbol = exe_ctx.frame->GetSymbolContext(eSymbolContextSymbol).symbol;
+            Symbol *symbol = frame->GetSymbolContext(eSymbolContextSymbol).symbol;
             if (symbol)
                 range = symbol->GetAddressRangeRef();
         }
@@ -352,13 +353,13 @@
         {
             if (m_options.at_pc)
             {
-                if (exe_ctx.frame == NULL)
+                if (frame == NULL)
                 {
                     result.AppendError ("Cannot disassemble around the current PC without a selected frame.\n");
                     result.SetStatus (eReturnStatusFailed);
                     return false;
                 }
-                range.GetBaseAddress() = exe_ctx.frame->GetFrameCodeAddress();
+                range.GetBaseAddress() = frame->GetFrameCodeAddress();
                 if (m_options.num_instructions == 0)
                 {
                     // Disassembling at the PC always disassembles some number of instructions (not the whole function).
@@ -389,15 +390,15 @@
             if (!range.GetBaseAddress().IsValid())
             {
                 // The default action is to disassemble the current frame function.
-                if (exe_ctx.frame)
+                if (frame)
                 {
-                    SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));
+                    SymbolContext sc(frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));
                     if (sc.function)
                         range.GetBaseAddress() = sc.function->GetAddressRange().GetBaseAddress();
                     else if (sc.symbol && sc.symbol->GetAddressRangePtr())
                         range.GetBaseAddress() = sc.symbol->GetAddressRangePtr()->GetBaseAddress();
                     else
-                        range.GetBaseAddress() = exe_ctx.frame->GetFrameCodeAddress();
+                        range.GetBaseAddress() = frame->GetFrameCodeAddress();
                 }
                 
                 if (!range.GetBaseAddress().IsValid())
@@ -431,15 +432,15 @@
             if (!range.GetBaseAddress().IsValid())
             {
                 // The default action is to disassemble the current frame function.
-                if (exe_ctx.frame)
+                if (frame)
                 {
-                    SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));
+                    SymbolContext sc(frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));
                     if (sc.function)
                         range = sc.function->GetAddressRange();
                     else if (sc.symbol && sc.symbol->GetAddressRangePtr())
                         range = *sc.symbol->GetAddressRangePtr();
                     else
-                        range.GetBaseAddress() = exe_ctx.frame->GetFrameCodeAddress();
+                        range.GetBaseAddress() = frame->GetFrameCodeAddress();
                 }
                 else
                 {