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/include/lldb/API/SBDebugger.h b/include/lldb/API/SBDebugger.h
index e7792ba..5b2a243 100644
--- a/include/lldb/API/SBDebugger.h
+++ b/include/lldb/API/SBDebugger.h
@@ -99,10 +99,10 @@
GetNumTargets ();
lldb::SBTarget
- GetCurrentTarget ();
+ GetSelectedTarget ();
void
- UpdateCurrentThread (lldb::SBProcess &process);
+ UpdateSelectedThread (lldb::SBProcess &process);
lldb::SBSourceManager &
GetSourceManager ();
diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h
index 98a1841..9896271 100644
--- a/include/lldb/API/SBProcess.h
+++ b/include/lldb/API/SBProcess.h
@@ -58,10 +58,10 @@
GetSTDERR (char *dst, size_t dst_len) const;
void
- ReportCurrentState (const lldb::SBEvent &event, FILE *out) const;
+ ReportEventState (const lldb::SBEvent &event, FILE *out) const;
void
- AppendCurrentStateReport (const lldb::SBEvent &event, lldb::SBCommandReturnObject &result);
+ AppendEventStateReport (const lldb::SBEvent &event, lldb::SBCommandReturnObject &result);
//------------------------------------------------------------------
// Thread related functions
@@ -76,13 +76,13 @@
GetThreadByID (lldb::tid_t sb_thread_id);
lldb::SBThread
- GetCurrentThread () const;
+ GetSelectedThread () const;
bool
- SetCurrentThread (const lldb::SBThread &thread);
+ SetSelectedThread (const lldb::SBThread &thread);
bool
- SetCurrentThreadByID (uint32_t tid);
+ SetSelectedThreadByID (uint32_t tid);
//------------------------------------------------------------------
// Stepping related functions
diff --git a/include/lldb/API/SBTarget.h b/include/lldb/API/SBTarget.h
index 1b0aa0e..63bc73b 100644
--- a/include/lldb/API/SBTarget.h
+++ b/include/lldb/API/SBTarget.h
@@ -82,9 +82,6 @@
bool
DeleteTargetFromList (lldb_private::TargetList *list);
- bool
- MakeCurrentTarget ();
-
lldb::SBBreakpoint
BreakpointCreateByLocation (const char *file, uint32_t line);
diff --git a/include/lldb/API/SBThread.h b/include/lldb/API/SBThread.h
index cb953c3..bf63b66 100644
--- a/include/lldb/API/SBThread.h
+++ b/include/lldb/API/SBThread.h
@@ -52,7 +52,7 @@
GetQueueName() const;
void
- DisplayFramesForCurrentContext (FILE *out,
+ DisplayFramesForSelectedContext (FILE *out,
FILE *err,
uint32_t first_frame,
uint32_t num_frames,
@@ -62,7 +62,7 @@
uint32_t source_lines_after = 3);
bool
- DisplaySingleFrameForCurrentContext (FILE *out,
+ DisplaySingleFrameForSelectedContext (FILE *out,
FILE *err,
lldb::SBFrame &frame,
bool show_frame_info,
diff --git a/include/lldb/API/SBValue.h b/include/lldb/API/SBValue.h
index 068b73f..b5ac5ef 100644
--- a/include/lldb/API/SBValue.h
+++ b/include/lldb/API/SBValue.h
@@ -112,10 +112,6 @@
#endif
private:
-//
-// lldb_private::ExecutionContext
-// GetCurrentExecutionContext ();
-//
lldb::ValueObjectSP m_opaque_sp;
};
diff --git a/include/lldb/Core/Debugger.h b/include/lldb/Core/Debugger.h
index 6ec23a1..a7d745b 100644
--- a/include/lldb/Core/Debugger.h
+++ b/include/lldb/Core/Debugger.h
@@ -101,10 +101,10 @@
GetSourceManager ();
lldb::TargetSP
- GetCurrentTarget ();
+ GetSelectedTarget ();
ExecutionContext
- GetCurrentExecutionContext();
+ GetSelectedExecutionContext();
//------------------------------------------------------------------
/// Get accessor for the target list.
///
diff --git a/include/lldb/Target/StackFrameList.h b/include/lldb/Target/StackFrameList.h
index 17e57e8..1ffd104 100644
--- a/include/lldb/Target/StackFrameList.h
+++ b/include/lldb/Target/StackFrameList.h
@@ -41,14 +41,14 @@
// Mark a stack frame as the current frame
uint32_t
- SetCurrentFrame (lldb_private::StackFrame *frame);
+ SetSelectedFrame (lldb_private::StackFrame *frame);
uint32_t
- GetCurrentFrameIndex () const;
+ GetSelectedFrameIndex () const;
// Mark a stack frame as the current frame using the frame index
void
- SetCurrentFrameByIndex (uint32_t idx);
+ SetSelectedFrameByIndex (uint32_t idx);
void
Clear ();
@@ -90,7 +90,7 @@
collection m_unwind_frames;
collection m_inline_frames;
InlinedFrameInfoCollection m_inlined_info;
- uint32_t m_current_frame_idx;
+ uint32_t m_selected_frame_idx;
bool m_show_inlined_frames;
private:
diff --git a/include/lldb/Target/TargetList.h b/include/lldb/Target/TargetList.h
index 699be83..84e8b64 100644
--- a/include/lldb/Target/TargetList.h
+++ b/include/lldb/Target/TargetList.h
@@ -181,13 +181,13 @@
SignalIfRunning (lldb::pid_t pid, int signo);
uint32_t
- SetCurrentTarget (Target *target);
+ SetSelectedTarget (Target *target);
void
- SetCurrentTargetWithIndex (uint32_t idx);
+ SetSelectedTargetWithIndex (uint32_t idx);
lldb::TargetSP
- GetCurrentTarget ();
+ GetSelectedTarget ();
protected:
@@ -197,7 +197,7 @@
//------------------------------------------------------------------
collection m_target_list;
mutable Mutex m_target_list_mutex;
- uint32_t m_current_target_idx;
+ uint32_t m_selected_target_idx;
private:
DISALLOW_COPY_AND_ASSIGN (TargetList);
};
diff --git a/include/lldb/Target/Thread.h b/include/lldb/Target/Thread.h
index 8df1b2e..5127392 100644
--- a/include/lldb/Target/Thread.h
+++ b/include/lldb/Target/Thread.h
@@ -177,13 +177,13 @@
GetStackFrameAtIndex (uint32_t idx);
lldb::StackFrameSP
- GetCurrentFrame ();
+ GetSelectedFrame ();
uint32_t
- SetCurrentFrame (lldb_private::StackFrame *frame);
+ SetSelectedFrame (lldb_private::StackFrame *frame);
void
- SetCurrentFrameByIndex (uint32_t frame_idx);
+ SetSelectedFrameByIndex (uint32_t frame_idx);
virtual RegisterContext *
GetRegisterContext () = 0;
diff --git a/include/lldb/Target/ThreadList.h b/include/lldb/Target/ThreadList.h
index 4f82cc7..8789ac2 100644
--- a/include/lldb/Target/ThreadList.h
+++ b/include/lldb/Target/ThreadList.h
@@ -46,13 +46,13 @@
AddThread (lldb::ThreadSP &thread_sp);
lldb::ThreadSP
- GetCurrentThread ();
+ GetSelectedThread ();
bool
- SetCurrentThreadByID (lldb::tid_t tid);
+ SetSelectedThreadByID (lldb::tid_t tid);
bool
- SetCurrentThreadByIndexID (uint32_t index_id);
+ SetSelectedThreadByIndexID (uint32_t index_id);
void
Clear();
@@ -109,7 +109,7 @@
uint32_t m_stop_id; ///< The process stop ID that this thread list is valid for.
collection m_threads; ///< The threads for this process.
mutable Mutex m_threads_mutex;
- lldb::tid_t m_current_tid; ///< For targets that need the notion of a current thread.
+ lldb::tid_t m_selected_tid; ///< For targets that need the notion of a current thread.
private:
ThreadList ();
diff --git a/source/API/SBCommandInterpreter.cpp b/source/API/SBCommandInterpreter.cpp
index 27e542c..b2cb639 100644
--- a/source/API/SBCommandInterpreter.cpp
+++ b/source/API/SBCommandInterpreter.cpp
@@ -166,7 +166,7 @@
if (m_opaque_ptr)
{
Debugger &debugger = m_opaque_ptr->GetDebugger();
- Target *target = debugger.GetCurrentTarget().get();
+ Target *target = debugger.GetSelectedTarget().get();
if (target)
process.SetProcess(target->GetProcessSP());
}
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index a07a8ae..73f125b 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -215,16 +215,16 @@
bool is_stopped = StateIsStoppedState (event_state);
if (!is_stopped)
- process.ReportCurrentState (event, out);
+ process.ReportEventState (event, out);
}
}
void
-SBDebugger::UpdateCurrentThread (SBProcess &process)
+SBDebugger::UpdateSelectedThread (SBProcess &process)
{
if (process.IsValid())
{
- SBThread curr_thread = process.GetCurrentThread ();
+ SBThread curr_thread = process.GetSelectedThread ();
SBThread thread;
StopReason curr_thread_stop_reason = eStopReasonInvalid;
if (curr_thread.IsValid())
@@ -270,9 +270,9 @@
}
}
if (plan_thread.IsValid())
- process.SetCurrentThreadByID (plan_thread.GetThreadID());
+ process.SetSelectedThreadByID (plan_thread.GetThreadID());
else if (other_thread.IsValid())
- process.SetCurrentThreadByID (other_thread.GetThreadID());
+ process.SetSelectedThreadByID (other_thread.GetThreadID());
else
{
if (curr_thread.IsValid())
@@ -281,7 +281,7 @@
thread = process.GetThreadAtIndex(0);
if (thread.IsValid())
- process.SetCurrentThreadByID (thread.GetThreadID());
+ process.SetSelectedThreadByID (thread.GetThreadID());
}
}
}
@@ -415,7 +415,7 @@
if (error.Success())
{
- m_opaque_sp->GetTargetList().SetCurrentTarget (target_sp.get());
+ m_opaque_sp->GetTargetList().SetSelectedTarget (target_sp.get());
target.reset(target_sp);
}
}
@@ -450,7 +450,7 @@
if (error.Success())
{
- m_opaque_sp->GetTargetList().SetCurrentTarget (target_sp.get());
+ m_opaque_sp->GetTargetList().SetSelectedTarget (target_sp.get());
target.reset (target_sp);
}
}
@@ -509,11 +509,11 @@
}
SBTarget
-SBDebugger::GetCurrentTarget ()
+SBDebugger::GetSelectedTarget ()
{
SBTarget sb_target;
if (m_opaque_sp)
- sb_target.reset(m_opaque_sp->GetTargetList().GetCurrentTarget ());
+ sb_target.reset(m_opaque_sp->GetTargetList().GetSelectedTarget ());
return sb_target;
}
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 7db5591..b3b083e 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -97,11 +97,11 @@
}
SBThread
-SBProcess::GetCurrentThread () const
+SBProcess::GetSelectedThread () const
{
SBThread sb_thread;
if (m_opaque_sp)
- sb_thread.SetThread (m_opaque_sp->GetThreadList().GetCurrentThread());
+ sb_thread.SetThread (m_opaque_sp->GetThreadList().GetSelectedThread());
return sb_thread;
}
@@ -152,7 +152,7 @@
}
void
-SBProcess::ReportCurrentState (const SBEvent &event, FILE *out) const
+SBProcess::ReportEventState (const SBEvent &event, FILE *out) const
{
if (out == NULL)
return;
@@ -173,7 +173,7 @@
}
void
-SBProcess::AppendCurrentStateReport (const SBEvent &event, SBCommandReturnObject &result)
+SBProcess::AppendEventStateReport (const SBEvent &event, SBCommandReturnObject &result)
{
if (m_opaque_sp != NULL)
{
@@ -190,18 +190,18 @@
}
bool
-SBProcess::SetCurrentThread (const SBThread &thread)
+SBProcess::SetSelectedThread (const SBThread &thread)
{
if (m_opaque_sp != NULL)
- return m_opaque_sp->GetThreadList().SetCurrentThreadByID (thread.GetThreadID());
+ return m_opaque_sp->GetThreadList().SetSelectedThreadByID (thread.GetThreadID());
return false;
}
bool
-SBProcess::SetCurrentThreadByID (uint32_t tid)
+SBProcess::SetSelectedThreadByID (uint32_t tid)
{
if (m_opaque_sp != NULL)
- return m_opaque_sp->GetThreadList().SetCurrentThreadByID (tid);
+ return m_opaque_sp->GetThreadList().SetSelectedThreadByID (tid);
return false;
}
@@ -274,7 +274,7 @@
{
state = m_opaque_sp->WaitForStateChangedEvents (NULL, event_sp);
SBEvent event (event_sp);
- AppendCurrentStateReport (event, result);
+ AppendEventStateReport (event, result);
state_changed = true;
}
}
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index b12a5ae..c863bc7 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -167,17 +167,6 @@
}
bool
-SBTarget::MakeCurrentTarget ()
-{
- if (m_opaque_sp)
- {
- m_opaque_sp->GetDebugger().GetTargetList().SetCurrentTarget (m_opaque_sp.get());
- return true;
- }
- return false;
-}
-
-bool
SBTarget::operator == (const SBTarget &rhs) const
{
return m_opaque_sp.get() == rhs.m_opaque_sp.get();
diff --git a/source/API/SBThread.cpp b/source/API/SBThread.cpp
index 087e29e..49a2150 100644
--- a/source/API/SBThread.cpp
+++ b/source/API/SBThread.cpp
@@ -219,7 +219,7 @@
void
-SBThread::DisplayFramesForCurrentContext (FILE *out,
+SBThread::DisplayFramesForSelectedContext (FILE *out,
FILE *err,
uint32_t first_frame,
uint32_t num_frames,
@@ -247,7 +247,7 @@
break;
SBFrame sb_frame (frame_sp);
- if (DisplaySingleFrameForCurrentContext (out,
+ if (DisplaySingleFrameForSelectedContext (out,
err,
sb_frame,
show_frame_info,
@@ -260,13 +260,13 @@
}
bool
-SBThread::DisplaySingleFrameForCurrentContext (FILE *out,
- FILE *err,
- SBFrame &frame,
- bool show_frame_info,
- bool show_source,
- uint32_t source_lines_after,
- uint32_t source_lines_before)
+SBThread::DisplaySingleFrameForSelectedContext (FILE *out,
+ FILE *err,
+ SBFrame &frame,
+ bool show_frame_info,
+ bool show_source,
+ uint32_t source_lines_after,
+ uint32_t source_lines_before)
{
bool success = false;
@@ -349,7 +349,7 @@
Process &process = m_opaque_sp->GetProcess();
// Why do we need to set the current thread by ID here???
- process.GetThreadList().SetCurrentThreadByID (m_opaque_sp->GetID());
+ process.GetThreadList().SetSelectedThreadByID (m_opaque_sp->GetID());
process.Resume();
}
}
@@ -383,7 +383,7 @@
Process &process = m_opaque_sp->GetProcess();
// Why do we need to set the current thread by ID here???
- process.GetThreadList().SetCurrentThreadByID (m_opaque_sp->GetID());
+ process.GetThreadList().SetSelectedThreadByID (m_opaque_sp->GetID());
process.Resume();
}
@@ -400,7 +400,7 @@
m_opaque_sp->QueueThreadPlanForStepOut (abort_other_plans, NULL, false, stop_other_threads, eVoteYes, eVoteNoOpinion);
Process &process = m_opaque_sp->GetProcess();
- process.GetThreadList().SetCurrentThreadByID (m_opaque_sp->GetID());
+ process.GetThreadList().SetSelectedThreadByID (m_opaque_sp->GetID());
process.Resume();
}
}
@@ -412,7 +412,7 @@
{
m_opaque_sp->QueueThreadPlanForStepSingleInstruction (step_over, true, true);
Process &process = m_opaque_sp->GetProcess();
- process.GetThreadList().SetCurrentThreadByID (m_opaque_sp->GetID());
+ process.GetThreadList().SetSelectedThreadByID (m_opaque_sp->GetID());
process.Resume();
}
}
@@ -429,7 +429,7 @@
m_opaque_sp->QueueThreadPlanForRunToAddress (abort_other_plans, target_addr, stop_other_threads);
Process &process = m_opaque_sp->GetProcess();
- process.GetThreadList().SetCurrentThreadByID (m_opaque_sp->GetID());
+ process.GetThreadList().SetSelectedThreadByID (m_opaque_sp->GetID());
process.Resume();
}
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index e381246..c7839cb 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -302,42 +302,6 @@
return is_ptr_type;
}
-
-//lldb_private::ExecutionContext
-//SBValue::GetCurrentExecutionContext ()
-//{
-// lldb_private::Process *process = NULL;
-// lldb_private::Thread *thread = NULL;
-// lldb_private::StackFrame *frame = NULL;
-//
-// SBTarget sb_target = SBDebugger::GetCurrentTarget();
-// if (sb_target.IsValid())
-// {
-// SBProcess sb_process = sb_target.GetProcess();
-// if (sb_process.IsValid())
-// {
-// process = sb_process.get();
-// SBThread sb_thread = sb_process.GetCurrentThread();
-// if (sb_thread.IsValid())
-// {
-// thread = sb_thread.GetLLDBObjectPtr();
-// frame = thread->GetStackFrameAtIndex(0).get();
-// lldb_private::ExecutionContext exe_context (process, thread, frame);
-// return exe_context;
-// }
-// else
-// {
-// lldb_private::ExecutionContext exe_context (process, NULL, NULL);
-// return exe_context;
-// }
-// }
-// }
-//
-// lldb_private::ExecutionContext exe_context (NULL, NULL, NULL);
-// return exe_context;
-//}
-//
-//
void *
SBValue::GetOpaqueType()
{
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(),
diff --git a/source/Core/Debugger.cpp b/source/Core/Debugger.cpp
index f079b9b..62ffa40 100644
--- a/source/Core/Debugger.cpp
+++ b/source/Core/Debugger.cpp
@@ -240,18 +240,18 @@
TargetSP
-Debugger::GetCurrentTarget ()
+Debugger::GetSelectedTarget ()
{
- return m_target_list.GetCurrentTarget ();
+ return m_target_list.GetSelectedTarget ();
}
ExecutionContext
-Debugger::GetCurrentExecutionContext ()
+Debugger::GetSelectedExecutionContext ()
{
ExecutionContext exe_ctx;
exe_ctx.Clear();
- lldb::TargetSP target_sp = GetCurrentTarget();
+ lldb::TargetSP target_sp = GetSelectedTarget();
exe_ctx.target = target_sp.get();
if (target_sp)
@@ -259,12 +259,12 @@
exe_ctx.process = target_sp->GetProcessSP().get();
if (exe_ctx.process && exe_ctx.process->IsRunning() == false)
{
- exe_ctx.thread = exe_ctx.process->GetThreadList().GetCurrentThread().get();
+ exe_ctx.thread = exe_ctx.process->GetThreadList().GetSelectedThread().get();
if (exe_ctx.thread == NULL)
exe_ctx.thread = exe_ctx.process->GetThreadList().GetThreadAtIndex(0).get();
if (exe_ctx.thread)
{
- exe_ctx.frame = exe_ctx.thread->GetCurrentFrame().get();
+ exe_ctx.frame = exe_ctx.thread->GetSelectedFrame().get();
if (exe_ctx.frame == NULL)
exe_ctx.frame = exe_ctx.thread->GetStackFrameAtIndex (0).get();
}
@@ -301,7 +301,7 @@
return;
// TODO: implement the STDIO to the process as an input reader...
- TargetSP target = GetCurrentTarget();
+ TargetSP target = GetSelectedTarget();
if (target.get() != NULL)
{
ProcessSP process_sp = target->GetProcessSP();
@@ -473,19 +473,19 @@
}
else
{
- TargetSP target_sp (GetCurrentTarget());
+ TargetSP target_sp (GetSelectedTarget());
if (target_sp)
{
m_exe_ctx.target = target_sp.get();
m_exe_ctx.process = target_sp->GetProcessSP().get();
if (m_exe_ctx.process && m_exe_ctx.process->IsRunning() == false)
{
- m_exe_ctx.thread = m_exe_ctx.process->GetThreadList().GetCurrentThread().get();
+ m_exe_ctx.thread = m_exe_ctx.process->GetThreadList().GetSelectedThread().get();
if (m_exe_ctx.thread == NULL)
m_exe_ctx.thread = m_exe_ctx.process->GetThreadList().GetThreadAtIndex(0).get();
if (m_exe_ctx.thread)
{
- m_exe_ctx.frame = m_exe_ctx.thread->GetCurrentFrame().get();
+ m_exe_ctx.frame = m_exe_ctx.thread->GetSelectedFrame().get();
if (m_exe_ctx.frame == NULL)
m_exe_ctx.frame = m_exe_ctx.thread->GetStackFrameAtIndex (0).get();
}
diff --git a/source/Interpreter/Options.cpp b/source/Interpreter/Options.cpp
index 410efc6..097bd45 100644
--- a/source/Interpreter/Options.cpp
+++ b/source/Interpreter/Options.cpp
@@ -746,7 +746,7 @@
if (module_name)
{
FileSpec module_spec(module_name);
- lldb::TargetSP target_sp = interpreter.GetDebugger().GetCurrentTarget();
+ lldb::TargetSP target_sp = interpreter.GetDebugger().GetSelectedTarget();
// Search filters require a target...
if (target_sp != NULL)
filter_ap.reset (new SearchFilterByModule (target_sp, module_spec));
diff --git a/source/Plugins/Process/MacOSX-User/scripts/test-ProcessDebug.pl b/source/Plugins/Process/MacOSX-User/scripts/test-ProcessDebug.pl
index 96b3115..e7feb51 100755
--- a/source/Plugins/Process/MacOSX-User/scripts/test-ProcessDebug.pl
+++ b/source/Plugins/Process/MacOSX-User/scripts/test-ProcessDebug.pl
@@ -338,7 +338,7 @@
}
elsif ( $pid_state == $lldb::eStateStopped )
{
- my $tid = lldb::PDProcessGetCurrentThread ( $pid );
+ my $tid = lldb::PDProcessGetSelectedThread ( $pid );
my $pc = lldb::PDThreadGetRegisterHexValueByName($pid, $tid, $lldb::PD_REGISTER_SET_ALL, "eip", 0);
$pc != 0 and printf("pc = 0x%8.8x ", $pc);
# my $sp = lldb::PDThreadGetRegisterHexValueByName($pid, $tid, $lldb::PD_REGISTER_SET_ALL, "esp", 0);
diff --git a/source/Target/ExecutionContext.cpp b/source/Target/ExecutionContext.cpp
index e79f8c2..74ad50a 100644
--- a/source/Target/ExecutionContext.cpp
+++ b/source/Target/ExecutionContext.cpp
@@ -41,9 +41,9 @@
process = t->GetProcessSP().get();
if (process)
{
- thread = process->GetThreadList().GetCurrentThread().get();
+ thread = process->GetThreadList().GetSelectedThread().get();
if (thread)
- frame = thread->GetCurrentFrame().get();
+ frame = thread->GetSelectedFrame().get();
}
}
}
diff --git a/source/Target/StackFrameList.cpp b/source/Target/StackFrameList.cpp
index e8a436f..b82e756 100644
--- a/source/Target/StackFrameList.cpp
+++ b/source/Target/StackFrameList.cpp
@@ -33,7 +33,7 @@
m_mutex (Mutex::eMutexTypeRecursive),
m_unwind_frames (),
m_inline_frames (),
- m_current_frame_idx (0)
+ m_selected_frame_idx (0)
{
}
@@ -306,15 +306,15 @@
}
uint32_t
-StackFrameList::GetCurrentFrameIndex () const
+StackFrameList::GetSelectedFrameIndex () const
{
Mutex::Locker locker (m_mutex);
- return m_current_frame_idx;
+ return m_selected_frame_idx;
}
uint32_t
-StackFrameList::SetCurrentFrame (lldb_private::StackFrame *frame)
+StackFrameList::SetSelectedFrame (lldb_private::StackFrame *frame)
{
Mutex::Locker locker (m_mutex);
const_iterator pos;
@@ -324,20 +324,20 @@
{
if (pos->get() == frame)
{
- m_current_frame_idx = std::distance (begin, pos);
- return m_current_frame_idx;
+ m_selected_frame_idx = std::distance (begin, pos);
+ return m_selected_frame_idx;
}
}
- m_current_frame_idx = 0;
- return m_current_frame_idx;
+ m_selected_frame_idx = 0;
+ return m_selected_frame_idx;
}
// Mark a stack frame as the current frame using the frame index
void
-StackFrameList::SetCurrentFrameByIndex (uint32_t idx)
+StackFrameList::SetSelectedFrameByIndex (uint32_t idx)
{
Mutex::Locker locker (m_mutex);
- m_current_frame_idx = idx;
+ m_selected_frame_idx = idx;
}
// The thread has been run, reset the number stack frames to zero so we can
diff --git a/source/Target/TargetList.cpp b/source/Target/TargetList.cpp
index ac16946..d128d04 100644
--- a/source/Target/TargetList.cpp
+++ b/source/Target/TargetList.cpp
@@ -30,7 +30,7 @@
Broadcaster("TargetList"),
m_target_list(),
m_target_list_mutex (Mutex::eMutexTypeRecursive),
- m_current_target_idx (0)
+ m_selected_target_idx (0)
{
}
@@ -101,7 +101,7 @@
if (target_sp.get())
{
Mutex::Locker locker(m_target_list_mutex);
- m_current_target_idx = m_target_list.size();
+ m_selected_target_idx = m_target_list.size();
m_target_list.push_back(target_sp);
}
@@ -123,7 +123,7 @@
// {
// error.Clear();
// Mutex::Locker locker(m_target_list_mutex);
-// m_current_target_idx = m_target_list.size();
+// m_selected_target_idx = m_target_list.size();
// m_target_list.push_back(target_sp);
// }
// }
@@ -334,7 +334,7 @@
}
uint32_t
-TargetList::SetCurrentTarget (Target* target)
+TargetList::SetSelectedTarget (Target* target)
{
Mutex::Locker locker (m_target_list_mutex);
collection::const_iterator pos,
@@ -344,19 +344,19 @@
{
if (pos->get() == target)
{
- m_current_target_idx = std::distance (begin, pos);
- return m_current_target_idx;
+ m_selected_target_idx = std::distance (begin, pos);
+ return m_selected_target_idx;
}
}
- m_current_target_idx = 0;
- return m_current_target_idx;
+ m_selected_target_idx = 0;
+ return m_selected_target_idx;
}
lldb::TargetSP
-TargetList::GetCurrentTarget ()
+TargetList::GetSelectedTarget ()
{
Mutex::Locker locker (m_target_list_mutex);
- if (m_current_target_idx >= m_target_list.size())
- m_current_target_idx = 0;
- return GetTargetAtIndex (m_current_target_idx);
+ if (m_selected_target_idx >= m_target_list.size())
+ m_selected_target_idx = 0;
+ return GetTargetAtIndex (m_selected_target_idx);
}
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index ff3cf6d..73d2dba 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -823,21 +823,21 @@
}
lldb::StackFrameSP
-Thread::GetCurrentFrame ()
+Thread::GetSelectedFrame ()
{
- return GetStackFrameAtIndex (GetStackFrameList().GetCurrentFrameIndex());
+ return GetStackFrameAtIndex (GetStackFrameList().GetSelectedFrameIndex());
}
uint32_t
-Thread::SetCurrentFrame (lldb_private::StackFrame *frame)
+Thread::SetSelectedFrame (lldb_private::StackFrame *frame)
{
- return GetStackFrameList().SetCurrentFrame(frame);
+ return GetStackFrameList().SetSelectedFrame(frame);
}
void
-Thread::SetCurrentFrameByIndex (uint32_t idx)
+Thread::SetSelectedFrameByIndex (uint32_t idx)
{
- GetStackFrameList().SetCurrentFrameByIndex(idx);
+ GetStackFrameList().SetSelectedFrameByIndex(idx);
}
void
diff --git a/source/Target/ThreadList.cpp b/source/Target/ThreadList.cpp
index c0d5c6a..553641d 100644
--- a/source/Target/ThreadList.cpp
+++ b/source/Target/ThreadList.cpp
@@ -23,7 +23,7 @@
m_stop_id (0),
m_threads(),
m_threads_mutex (Mutex::eMutexTypeRecursive),
- m_current_tid (LLDB_INVALID_THREAD_ID)
+ m_selected_tid (LLDB_INVALID_THREAD_ID)
{
}
@@ -32,7 +32,7 @@
m_stop_id (),
m_threads (),
m_threads_mutex (Mutex::eMutexTypeRecursive),
- m_current_tid ()
+ m_selected_tid ()
{
// Use the assignment operator since it uses the mutex
*this = rhs;
@@ -50,7 +50,7 @@
m_process = rhs.m_process;
m_stop_id = rhs.m_stop_id;
m_threads = rhs.m_threads;
- m_current_tid = rhs.m_current_tid;
+ m_selected_tid = rhs.m_selected_tid;
}
return *this;
}
@@ -274,7 +274,7 @@
{
m_stop_id = 0;
m_threads.clear();
- m_current_tid = LLDB_INVALID_THREAD_ID;
+ m_selected_tid = LLDB_INVALID_THREAD_ID;
}
void
@@ -376,7 +376,7 @@
// You can't say "stop others" and also want yourself to be suspended.
assert (thread_sp->GetCurrentPlan()->RunState() != eStateSuspended);
- if (thread_sp == GetCurrentThread())
+ if (thread_sp == GetSelectedThread())
{
run_only_current_thread = true;
run_me_only_list.Clear();
@@ -415,7 +415,7 @@
if (run_only_current_thread)
{
- thread_to_run = GetCurrentThread();
+ thread_to_run = GetSelectedThread();
}
else if (run_me_only_list.GetSize (false) == 1)
{
@@ -456,34 +456,34 @@
}
ThreadSP
-ThreadList::GetCurrentThread ()
+ThreadList::GetSelectedThread ()
{
Mutex::Locker locker(m_threads_mutex);
- return FindThreadByID(m_current_tid);
+ return FindThreadByID(m_selected_tid);
}
bool
-ThreadList::SetCurrentThreadByID (lldb::tid_t tid)
+ThreadList::SetSelectedThreadByID (lldb::tid_t tid)
{
Mutex::Locker locker(m_threads_mutex);
if (FindThreadByID(tid).get())
- m_current_tid = tid;
+ m_selected_tid = tid;
else
- m_current_tid = LLDB_INVALID_THREAD_ID;
+ m_selected_tid = LLDB_INVALID_THREAD_ID;
- return m_current_tid != LLDB_INVALID_THREAD_ID;
+ return m_selected_tid != LLDB_INVALID_THREAD_ID;
}
bool
-ThreadList::SetCurrentThreadByIndexID (uint32_t index_id)
+ThreadList::SetSelectedThreadByIndexID (uint32_t index_id)
{
Mutex::Locker locker(m_threads_mutex);
ThreadSP thread_sp (FindThreadByIndexID(index_id));
if (thread_sp.get())
- m_current_tid = thread_sp->GetID();
+ m_selected_tid = thread_sp->GetID();
else
- m_current_tid = LLDB_INVALID_THREAD_ID;
+ m_selected_tid = LLDB_INVALID_THREAD_ID;
- return m_current_tid != LLDB_INVALID_THREAD_ID;
+ return m_selected_tid != LLDB_INVALID_THREAD_ID;
}
diff --git a/tools/driver/Driver.cpp b/tools/driver/Driver.cpp
index 2add927..fd996bf 100644
--- a/tools/driver/Driver.cpp
+++ b/tools/driver/Driver.cpp
@@ -603,7 +603,7 @@
// The process has stuff waiting for stdout; get it and write it out to the appropriate place.
char stdio_buffer[1024];
size_t len;
- while ((len = m_debugger.GetCurrentTarget().GetProcess().GetSTDOUT (stdio_buffer, sizeof (stdio_buffer))) > 0)
+ while ((len = m_debugger.GetSelectedTarget().GetProcess().GetSTDOUT (stdio_buffer, sizeof (stdio_buffer))) > 0)
m_io_channel_ap->OutWrite (stdio_buffer, len);
}
@@ -613,18 +613,18 @@
// The process has stuff waiting for stderr; get it and write it out to the appropriate place.
char stdio_buffer[1024];
size_t len;
- while ((len = m_debugger.GetCurrentTarget().GetProcess().GetSTDERR (stdio_buffer, sizeof (stdio_buffer))) > 0)
+ while ((len = m_debugger.GetSelectedTarget().GetProcess().GetSTDERR (stdio_buffer, sizeof (stdio_buffer))) > 0)
m_io_channel_ap->ErrWrite (stdio_buffer, len);
}
void
-Driver::UpdateCurrentThread ()
+Driver::UpdateSelectedThread ()
{
using namespace lldb;
- SBProcess process(m_debugger.GetCurrentTarget().GetProcess());
+ SBProcess process(m_debugger.GetSelectedTarget().GetProcess());
if (process.IsValid())
{
- SBThread curr_thread (process.GetCurrentThread());
+ SBThread curr_thread (process.GetSelectedThread());
SBThread thread;
StopReason curr_thread_stop_reason = eStopReasonInvalid;
curr_thread_stop_reason = curr_thread.GetStopReason();
@@ -664,9 +664,9 @@
}
}
if (plan_thread.IsValid())
- process.SetCurrentThread (plan_thread);
+ process.SetSelectedThread (plan_thread);
else if (other_thread.IsValid())
- process.SetCurrentThread (other_thread);
+ process.SetSelectedThread (other_thread);
else
{
if (curr_thread.IsValid())
@@ -675,7 +675,7 @@
thread = process.GetThreadAtIndex(0);
if (thread.IsValid())
- process.SetCurrentThread (thread);
+ process.SetSelectedThread (thread);
}
}
}
@@ -756,7 +756,7 @@
}
else
{
- UpdateCurrentThread ();
+ UpdateSelectedThread ();
m_debugger.HandleCommand("process status");
m_io_channel_ap->RefreshPrompt();
}
@@ -1201,7 +1201,7 @@
else
done = HandleIOEvent (event);
}
- else if (event.BroadcasterMatchesRef (m_debugger.GetCurrentTarget().GetProcess().GetBroadcaster()))
+ else if (event.BroadcasterMatchesRef (m_debugger.GetSelectedTarget().GetProcess().GetBroadcaster()))
{
HandleProcessEvent (event);
}
@@ -1231,7 +1231,7 @@
}
}
- SBProcess process = m_debugger.GetCurrentTarget().GetProcess();
+ SBProcess process = m_debugger.GetSelectedTarget().GetProcess();
if (process.IsValid())
process.Destroy();
}
diff --git a/tools/driver/Driver.h b/tools/driver/Driver.h
index 4f485bd..199165b 100644
--- a/tools/driver/Driver.h
+++ b/tools/driver/Driver.h
@@ -139,7 +139,7 @@
GetProcessSTDERR ();
void
- UpdateCurrentThread ();
+ UpdateSelectedThread ();
void
CloseIOChannelFile ();