From 008c45f1a1a7a60736a0afbb03b57f43b11dcf49 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 12 Nov 2013 23:33:32 +0000 Subject: [PATCH] Change SBThread::GetExtendedBacktrace to SBThread::GetExtendedBacktraceThread to make it more clear what is being returned. llvm-svn: 194531 --- lldb/include/lldb/API/SBThread.h | 2 +- lldb/include/lldb/Target/SystemRuntime.h | 2 +- lldb/scripts/Python/interface/SBThread.i | 4 ++-- lldb/source/API/SBProcess.cpp | 2 +- lldb/source/API/SBThread.cpp | 5 ++--- lldb/source/Commands/CommandObjectThread.cpp | 2 +- lldb/source/Target/SystemRuntime.cpp | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h index d062d7121303..cdc2cb02d1d7 100644 --- a/lldb/include/lldb/API/SBThread.h +++ b/lldb/include/lldb/API/SBThread.h @@ -202,7 +202,7 @@ public: GetStatus (lldb::SBStream &status) const; SBThread - GetExtendedBacktrace (const char *type); + GetExtendedBacktraceThread (const char *type); protected: friend class SBBreakpoint; diff --git a/lldb/include/lldb/Target/SystemRuntime.h b/lldb/include/lldb/Target/SystemRuntime.h index e0d311a485ab..7a0703e6cc34 100644 --- a/lldb/include/lldb/Target/SystemRuntime.h +++ b/lldb/include/lldb/Target/SystemRuntime.h @@ -158,7 +158,7 @@ public: /// An empty ThreadSP will be returned if no thread origin is available. //------------------------------------------------------------------ virtual lldb::ThreadSP - GetExtendedBacktrace (lldb::ThreadSP thread, ConstString type); + GetExtendedBacktraceThread (lldb::ThreadSP thread, ConstString type); protected: //------------------------------------------------------------------ diff --git a/lldb/scripts/Python/interface/SBThread.i b/lldb/scripts/Python/interface/SBThread.i index dc45b936fad2..145016aecf07 100644 --- a/lldb/scripts/Python/interface/SBThread.i +++ b/lldb/scripts/Python/interface/SBThread.i @@ -249,9 +249,9 @@ public: normal threads -- you cannot step or resume it, for instance -- it is intended to used primarily for generating a backtrace. You may request the returned thread's own thread origin in turn. - ") GetExtendedBacktrace; + ") GetExtendedBacktraceThread; lldb::SBThread - GetExtendedBacktrace (const char *type); + GetExtendedBacktraceThread (const char *type); %pythoncode %{ class frames_access(object): diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index d690da7eed87..557006f24345 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -1278,7 +1278,7 @@ SBProcess::GetExtendedBacktraceTypeAtIndex (uint32_t idx) if (process_sp && process_sp->GetSystemRuntime()) { SystemRuntime *runtime = process_sp->GetSystemRuntime(); - std::vector names = runtime->GetExtendedBacktraceTypes(); + const std::vector &names = runtime->GetExtendedBacktraceTypes(); if (idx < names.size()) { return names[idx].AsCString(); diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 72fe3cf83619..e36d09e1ea9a 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -433,7 +433,6 @@ SBThread::SetThread (const ThreadSP& lldb_object_sp) m_opaque_sp->SetThreadSP (lldb_object_sp); } - lldb::tid_t SBThread::GetThreadID () const { @@ -1283,7 +1282,7 @@ SBThread::GetDescription (SBStream &description) const } SBThread -SBThread::GetExtendedBacktrace (const char *type) +SBThread::GetExtendedBacktraceThread (const char *type) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); Mutex::Locker api_locker; @@ -1305,7 +1304,7 @@ SBThread::GetExtendedBacktrace (const char *type) SystemRuntime *runtime = process->GetSystemRuntime(); if (runtime) { - ThreadSP new_thread_sp (runtime->GetExtendedBacktrace (real_thread, type_const)); + ThreadSP new_thread_sp (runtime->GetExtendedBacktraceThread (real_thread, type_const)); // Save this in the Process' ExtendedThreadList so a strong pointer retains the // object. process->GetExtendedThreadList().AddThread (new_thread_sp); diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index bfe9541154a3..10d661882c92 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -180,7 +180,7 @@ protected: const std::vector &types = runtime->GetExtendedBacktraceTypes(); for (auto type : types) { - ThreadSP ext_thread_sp = runtime->GetExtendedBacktrace (thread->shared_from_this(), type); + ThreadSP ext_thread_sp = runtime->GetExtendedBacktraceThread (thread->shared_from_this(), type); if (ext_thread_sp && ext_thread_sp->IsValid ()) { const uint32_t num_frames_with_source = 0; diff --git a/lldb/source/Target/SystemRuntime.cpp b/lldb/source/Target/SystemRuntime.cpp index c885aa774c7c..5c07ed388ae4 100644 --- a/lldb/source/Target/SystemRuntime.cpp +++ b/lldb/source/Target/SystemRuntime.cpp @@ -67,7 +67,7 @@ SystemRuntime::GetExtendedBacktraceTypes () } ThreadSP -SystemRuntime::GetExtendedBacktrace (ThreadSP thread, ConstString type) +SystemRuntime::GetExtendedBacktraceThread (ThreadSP thread, ConstString type) { return ThreadSP(); }