Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread.  Selected makes more sense, since these are set by some user action (a selection).  I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112221 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandCompletions.cpp b/source/Commands/CommandCompletions.cpp
index 8547016..77e9ac8 100644
--- a/source/Commands/CommandCompletions.cpp
+++ b/source/Commands/CommandCompletions.cpp
@@ -102,7 +102,7 @@
 
     if (searcher == NULL)
     {
-        lldb::TargetSP target_sp = interpreter.GetDebugger().GetCurrentTarget();
+        lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
         SearchFilter null_searcher (target_sp);
         completer.DoCompletion (&null_searcher);
     }
@@ -368,7 +368,7 @@
     
     if (searcher == NULL)
     {
-        lldb::TargetSP target_sp = interpreter.GetDebugger().GetCurrentTarget();
+        lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
         SearchFilter null_searcher (target_sp);
         completer.DoCompletion (&null_searcher);
     }
@@ -399,7 +399,7 @@
 
     if (searcher == NULL)
     {
-        lldb::TargetSP target_sp = interpreter.GetDebugger().GetCurrentTarget();
+        lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
         SearchFilter null_searcher (target_sp);
         completer.DoCompletion (&null_searcher);
     }
diff --git a/source/Commands/CommandObjectArgs.cpp b/source/Commands/CommandObjectArgs.cpp
index 6044898..0c8b8b6 100644
--- a/source/Commands/CommandObjectArgs.cpp
+++ b/source/Commands/CommandObjectArgs.cpp
@@ -140,7 +140,7 @@
         return false;
     }
         
-    lldb::StackFrameSP thread_cur_frame = thread->GetCurrentFrame ();
+    lldb::StackFrameSP thread_cur_frame = thread->GetSelectedFrame ();
     if (!thread_cur_frame)
     {
         result.AppendError ("The current thread has no current frame.");
diff --git a/source/Commands/CommandObjectBreakpoint.cpp b/source/Commands/CommandObjectBreakpoint.cpp
index 8ceadca..3bbd282 100644
--- a/source/Commands/CommandObjectBreakpoint.cpp
+++ b/source/Commands/CommandObjectBreakpoint.cpp
@@ -273,7 +273,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("Invalid target, set executable file using 'file' command.");
@@ -706,7 +706,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("Invalid target, set executable file using 'file' command.");
@@ -797,7 +797,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("Invalid target, set executable file using 'file' command.");
@@ -897,7 +897,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("Invalid target, set executable file using 'file' command.");
@@ -993,7 +993,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("Invalid target, set executable file using 'file' command.");
@@ -1240,7 +1240,7 @@
         return false;
     }
 
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("Invalid target, set executable file using 'file' command.");
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index a1b973b..765333b 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -213,7 +213,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
 
     if (target == NULL)
     {
@@ -417,7 +417,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
 
     if (target == NULL)
     {
@@ -503,7 +503,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
 
     if (target == NULL)
     {
diff --git a/source/Commands/CommandObjectDisassemble.cpp b/source/Commands/CommandObjectDisassemble.cpp
index 0bc4bf3..7304a9b 100644
--- a/source/Commands/CommandObjectDisassemble.cpp
+++ b/source/Commands/CommandObjectDisassemble.cpp
@@ -160,7 +160,7 @@
     CommandReturnObject &result
 )
 {
-    Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+    Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
     if (target == NULL)
     {
         result.AppendError ("invalid target, set executable file using 'file' command");
diff --git a/source/Commands/CommandObjectFile.cpp b/source/Commands/CommandObjectFile.cpp
index 25576e1..1ce8930 100644
--- a/source/Commands/CommandObjectFile.cpp
+++ b/source/Commands/CommandObjectFile.cpp
@@ -132,7 +132,7 @@
 
         if (target_sp)
         {
-            debugger.GetTargetList().SetCurrentTarget(target_sp.get());
+            debugger.GetTargetList().SetSelectedTarget(target_sp.get());
             result.AppendMessageWithFormat ("Current executable set to '%s' (%s).\n", file_path, target_sp->GetArchitecture().AsCString());
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
diff --git a/source/Commands/CommandObjectFrame.cpp b/source/Commands/CommandObjectFrame.cpp
index e2c52a6..316b0f7 100644
--- a/source/Commands/CommandObjectFrame.cpp
+++ b/source/Commands/CommandObjectFrame.cpp
@@ -109,8 +109,8 @@
                 const uint32_t frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0);
                 if (frame_idx < num_frames)
                 {
-                    exe_ctx.thread->SetCurrentFrameByIndex (frame_idx);
-                    exe_ctx.frame = exe_ctx.thread->GetCurrentFrame ().get();
+                    exe_ctx.thread->SetSelectedFrameByIndex (frame_idx);
+                    exe_ctx.frame = exe_ctx.thread->GetSelectedFrame ().get();
 
                     if (exe_ctx.frame)
                     {
diff --git a/source/Commands/CommandObjectImage.cpp b/source/Commands/CommandObjectImage.cpp
index c9a2254..d28cbf9 100644
--- a/source/Commands/CommandObjectImage.cpp
+++ b/source/Commands/CommandObjectImage.cpp
@@ -579,7 +579,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target == NULL)
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
@@ -687,7 +687,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target == NULL)
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
@@ -794,7 +794,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target == NULL)
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
@@ -901,7 +901,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target == NULL)
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
@@ -1070,7 +1070,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target == NULL)
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
@@ -1438,7 +1438,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target == NULL)
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
diff --git a/source/Commands/CommandObjectProcess.cpp b/source/Commands/CommandObjectProcess.cpp
index 7f4d536..dd2d545 100644
--- a/source/Commands/CommandObjectProcess.cpp
+++ b/source/Commands/CommandObjectProcess.cpp
@@ -124,7 +124,7 @@
              Args& launch_args,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         bool synchronous_execution = interpreter.GetSynchronous ();
     //    bool launched = false;
     //    bool stopped_after_launch = false;
@@ -377,7 +377,7 @@
                 if (process && process->IsAlive())
                     return true;
                     
-                Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+                Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
                 if (target == NULL)
                 {
                     // No target has been set yet, for now do host completion.  Otherwise I don't know how we would
@@ -436,7 +436,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
 
         Process *process = interpreter.GetDebugger().GetExecutionContext().process;
         if (process)
@@ -470,7 +470,7 @@
                 result.AppendError(error.AsCString("Error creating empty target"));
                 return false;
             }
-            interpreter.GetDebugger().GetTargetList().SetCurrentTarget(target);
+            interpreter.GetDebugger().GetTargetList().SetSelectedTarget(target);
         }
         
         // Record the old executable module, we want to issue a warning if the process of attaching changed the
diff --git a/source/Commands/CommandObjectSource.cpp b/source/Commands/CommandObjectSource.cpp
index d905bcb..6f83e2b 100644
--- a/source/Commands/CommandObjectSource.cpp
+++ b/source/Commands/CommandObjectSource.cpp
@@ -267,7 +267,7 @@
         if (!m_options.symbol_name.empty())
         {
             // Displaying the source for a symbol:
-            Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+            Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
             if (target == NULL)
             {
                 result.AppendError ("invalid target, set executable file using 'file' command");
@@ -441,7 +441,7 @@
         else
         {
             const char *filename = m_options.file_name.c_str();
-            Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+            Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
             if (target == NULL)
             {
                 result.AppendError ("invalid target, set executable file using 'file' command");
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 3f8581c..3c41464 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -50,7 +50,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target)
         {
             uint32_t argc = command.GetArgumentCount();
@@ -113,7 +113,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target)
         {
             bool notify = true;
@@ -148,7 +148,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target)
         {
             uint32_t argc = command.GetArgumentCount();
@@ -231,7 +231,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target)
         {
             if (command.GetArgumentCount() != 0)
@@ -272,7 +272,7 @@
              Args& command,
              CommandReturnObject &result)
     {
-        Target *target = interpreter.GetDebugger().GetCurrentTarget().get();
+        Target *target = interpreter.GetDebugger().GetSelectedTarget().get();
         if (target)
         {
             if (command.GetArgumentCount() != 1)
@@ -337,8 +337,8 @@
 //                const uint32_t frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0);
 //                if (frame_idx < num_frames)
 //                {
-//                    exe_ctx.thread->SetCurrentFrameByIndex (frame_idx);
-//                    exe_ctx.frame = exe_ctx.thread->GetCurrentFrame ().get();
+//                    exe_ctx.thread->SetSelectedFrameByIndex (frame_idx);
+//                    exe_ctx.frame = exe_ctx.thread->GetSelectedFrame ().get();
 //
 //                    if (exe_ctx.frame)
 //                    {
diff --git a/source/Commands/CommandObjectThread.cpp b/source/Commands/CommandObjectThread.cpp
index 82749c0..f69a09e 100644
--- a/source/Commands/CommandObjectThread.cpp
+++ b/source/Commands/CommandObjectThread.cpp
@@ -55,7 +55,7 @@
         }
 
         strm.Indent();
-        strm.Printf("%c ", thread->GetProcess().GetThreadList().GetCurrentThread().get() == thread ? '*' : ' ');
+        strm.Printf("%c ", thread->GetProcess().GetThreadList().GetSelectedThread().get() == thread ? '*' : ' ');
 
         // Show one frame with only the first showing source
         if (show_source)
@@ -465,7 +465,7 @@
 
             if (command.GetArgumentCount() == 0)
             {
-                thread = process->GetThreadList().GetCurrentThread().get();
+                thread = process->GetThreadList().GetSelectedThread().get();
                 if (thread == NULL)
                 {
                     result.AppendError ("no current thread in process");
@@ -525,7 +525,7 @@
                 else
                     new_plan = thread->QueueThreadPlanForStepSingleInstruction (false, abort_other_plans, bool_stop_other_threads);
 
-                process->GetThreadList().SetCurrentThreadByID (thread->GetID());
+                process->GetThreadList().SetSelectedThreadByID (thread->GetID());
                 process->Resume ();
             }
             else if (m_step_type == eStepTypeOver)
@@ -549,19 +549,19 @@
                 // Maybe there should be a parameter to control this.
                 new_plan->SetOkayToDiscard(false);
 
-                process->GetThreadList().SetCurrentThreadByID (thread->GetID());
+                process->GetThreadList().SetSelectedThreadByID (thread->GetID());
                 process->Resume ();
             }
             else if (m_step_type == eStepTypeTrace)
             {
                 thread->QueueThreadPlanForStepSingleInstruction (false, abort_other_plans, bool_stop_other_threads);
-                process->GetThreadList().SetCurrentThreadByID (thread->GetID());
+                process->GetThreadList().SetSelectedThreadByID (thread->GetID());
                 process->Resume ();
             }
             else if (m_step_type == eStepTypeTraceOver)
             {
                 thread->QueueThreadPlanForStepSingleInstruction (true, abort_other_plans, bool_stop_other_threads);
-                process->GetThreadList().SetCurrentThreadByID (thread->GetID());
+                process->GetThreadList().SetSelectedThreadByID (thread->GetID());
                 process->Resume ();
             }
             else if (m_step_type == eStepTypeOut)
@@ -573,7 +573,7 @@
                 // Maybe there should be a parameter to control this.
                 new_plan->SetOkayToDiscard(false);
 
-                process->GetThreadList().SetCurrentThreadByID (thread->GetID());
+                process->GetThreadList().SetSelectedThreadByID (thread->GetID());
                 process->Resume ();
             }
             else
@@ -591,7 +591,7 @@
                 //  {
                 //    state = process->WaitForStateChangedEvents (NULL, event_sp);
                 //  }
-                process->GetThreadList().SetCurrentThreadByID (thread->GetID());
+                process->GetThreadList().SetSelectedThreadByID (thread->GetID());
                 result.SetDidChangeProcessState (true);
                 result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
                 result.SetStatus (eReturnStatusSuccessFinishNoResult);
@@ -665,7 +665,7 @@
     {
         bool synchronous_execution = interpreter.GetSynchronous ();
 
-        if (!interpreter.GetDebugger().GetCurrentTarget().get())
+        if (!interpreter.GetDebugger().GetSelectedTarget().get())
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
             result.SetStatus (eReturnStatusFailed);
@@ -725,7 +725,7 @@
             }
             else
             {
-                Thread *current_thread = process->GetThreadList().GetCurrentThread().get();
+                Thread *current_thread = process->GetThreadList().GetSelectedThread().get();
                 if (current_thread == NULL)
                 {
                     result.AppendError ("the process doesn't have a current thread");
@@ -917,7 +917,7 @@
     {
         bool synchronous_execution = interpreter.GetSynchronous ();
 
-        if (!interpreter.GetDebugger().GetCurrentTarget().get())
+        if (!interpreter.GetDebugger().GetSelectedTarget().get())
         {
             result.AppendError ("invalid target, set executable file using 'file' command");
             result.SetStatus (eReturnStatusFailed);
@@ -953,7 +953,7 @@
 
             if (m_options.m_thread_idx == LLDB_INVALID_THREAD_ID)
             {
-                thread = process->GetThreadList().GetCurrentThread().get();
+                thread = process->GetThreadList().GetSelectedThread().get();
             }
             else
             {
@@ -1033,7 +1033,7 @@
 
             }
 
-            process->GetThreadList().SetCurrentThreadByID (m_options.m_thread_idx);
+            process->GetThreadList().SetSelectedThreadByID (m_options.m_thread_idx);
             Error error (process->Resume ());
             if (error.Success())
             {
@@ -1129,7 +1129,7 @@
             return false;
         }
 
-        process->GetThreadList().SetCurrentThreadByID(new_thread->GetID());
+        process->GetThreadList().SetSelectedThreadByID(new_thread->GetID());
         
         DisplayThreadInfo (interpreter,
                            result.GetOutputStream(),