forked from OSchip/llvm-project
Rename extended backtrace methods to take out the "ThreadOrigin"
bit from the method names. <rdar://problem/15314369> llvm-svn: 194122
This commit is contained in:
parent
cae5652838
commit
95d005c789
|
@ -283,7 +283,7 @@ public:
|
||||||
/// available.
|
/// available.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
uint32_t
|
uint32_t
|
||||||
GetNumThreadOriginExtendedBacktraceTypes ();
|
GetNumExtendedBacktraceTypes ();
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Return the name of one of the thread-origin extended backtrace
|
/// Return the name of one of the thread-origin extended backtrace
|
||||||
|
@ -299,7 +299,7 @@ public:
|
||||||
/// The name at that index.
|
/// The name at that index.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
const char *
|
const char *
|
||||||
GetThreadOriginExtendedBacktraceTypeAtIndex (uint32_t idx);
|
GetExtendedBacktraceTypeAtIndex (uint32_t idx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class SBAddress;
|
friend class SBAddress;
|
||||||
|
|
|
@ -202,7 +202,7 @@ public:
|
||||||
GetStatus (lldb::SBStream &status) const;
|
GetStatus (lldb::SBStream &status) const;
|
||||||
|
|
||||||
SBThread
|
SBThread
|
||||||
GetThreadOriginExtendedBacktrace (const char *type);
|
GetExtendedBacktrace (const char *type);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class SBBreakpoint;
|
friend class SBBreakpoint;
|
||||||
|
|
|
@ -128,7 +128,7 @@ public:
|
||||||
/// backtrace capabilities are available.
|
/// backtrace capabilities are available.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual std::vector<ConstString>
|
virtual std::vector<ConstString>
|
||||||
GetThreadOriginExtendedBacktraceTypes ();
|
GetExtendedBacktraceTypes ();
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Return a Thread which shows the origin of this thread's creation.
|
/// Return a Thread which shows the origin of this thread's creation.
|
||||||
|
@ -147,7 +147,7 @@ public:
|
||||||
///
|
///
|
||||||
/// @param [in] type
|
/// @param [in] type
|
||||||
/// The type of thread origin being requested. The types supported
|
/// The type of thread origin being requested. The types supported
|
||||||
/// are returned from SystemRuntime::GetThreadOriginExtendedBacktraceTypes.
|
/// are returned from SystemRuntime::GetExtendedBacktraceTypes.
|
||||||
///
|
///
|
||||||
/// @return
|
/// @return
|
||||||
/// A ThreadSP which will have a StackList of frames. This Thread will
|
/// A ThreadSP which will have a StackList of frames. This Thread will
|
||||||
|
@ -158,7 +158,7 @@ public:
|
||||||
/// An empty ThreadSP will be returned if no thread origin is available.
|
/// An empty ThreadSP will be returned if no thread origin is available.
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
virtual lldb::ThreadSP
|
virtual lldb::ThreadSP
|
||||||
GetThreadOriginExtendedBacktrace (lldb::ThreadSP thread, ConstString type);
|
GetExtendedBacktrace (lldb::ThreadSP thread, ConstString type);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
|
@ -361,18 +361,18 @@ public:
|
||||||
able to show a backtrace of when that thread was originally created,
|
able to show a backtrace of when that thread was originally created,
|
||||||
or the work item was enqueued to it (in the case of a libdispatch
|
or the work item was enqueued to it (in the case of a libdispatch
|
||||||
queue).
|
queue).
|
||||||
") GetNumThreadOriginExtendedBacktraceTypes;
|
") GetNumExtendedBacktraceTypes;
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
GetNumThreadOriginExtendedBacktraceTypes ();
|
GetNumExtendedBacktraceTypes ();
|
||||||
|
|
||||||
%feature("autodoc", "
|
%feature("autodoc", "
|
||||||
Takes an index argument, returns the name of one of the thread-origin
|
Takes an index argument, returns the name of one of the thread-origin
|
||||||
extended backtrace methods as a str.
|
extended backtrace methods as a str.
|
||||||
") GetThreadOriginExtendedBacktraceTypeAtIndex;
|
") GetExtendedBacktraceTypeAtIndex;
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
GetThreadOriginExtendedBacktraceTypeAtIndex (uint32_t idx);
|
GetExtendedBacktraceTypeAtIndex (uint32_t idx);
|
||||||
|
|
||||||
%pythoncode %{
|
%pythoncode %{
|
||||||
def __get_is_alive__(self):
|
def __get_is_alive__(self):
|
||||||
|
|
|
@ -249,9 +249,9 @@ public:
|
||||||
normal threads -- you cannot step or resume it, for instance -- it is
|
normal threads -- you cannot step or resume it, for instance -- it is
|
||||||
intended to used primarily for generating a backtrace. You may request
|
intended to used primarily for generating a backtrace. You may request
|
||||||
the returned thread's own thread origin in turn.
|
the returned thread's own thread origin in turn.
|
||||||
") GetThreadOriginExtendedBacktrace;
|
") GetExtendedBacktrace;
|
||||||
lldb::SBThread
|
lldb::SBThread
|
||||||
GetThreadOriginExtendedBacktrace (const char *type);
|
GetExtendedBacktrace (const char *type);
|
||||||
|
|
||||||
%pythoncode %{
|
%pythoncode %{
|
||||||
class frames_access(object):
|
class frames_access(object):
|
||||||
|
|
|
@ -1260,25 +1260,25 @@ SBProcess::UnloadImage (uint32_t image_token)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
SBProcess::GetNumThreadOriginExtendedBacktraceTypes ()
|
SBProcess::GetNumExtendedBacktraceTypes ()
|
||||||
{
|
{
|
||||||
ProcessSP process_sp(GetSP());
|
ProcessSP process_sp(GetSP());
|
||||||
if (process_sp && process_sp->GetSystemRuntime())
|
if (process_sp && process_sp->GetSystemRuntime())
|
||||||
{
|
{
|
||||||
SystemRuntime *runtime = process_sp->GetSystemRuntime();
|
SystemRuntime *runtime = process_sp->GetSystemRuntime();
|
||||||
return runtime->GetThreadOriginExtendedBacktraceTypes().size();
|
return runtime->GetExtendedBacktraceTypes().size();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
SBProcess::GetThreadOriginExtendedBacktraceTypeAtIndex (uint32_t idx)
|
SBProcess::GetExtendedBacktraceTypeAtIndex (uint32_t idx)
|
||||||
{
|
{
|
||||||
ProcessSP process_sp(GetSP());
|
ProcessSP process_sp(GetSP());
|
||||||
if (process_sp && process_sp->GetSystemRuntime())
|
if (process_sp && process_sp->GetSystemRuntime())
|
||||||
{
|
{
|
||||||
SystemRuntime *runtime = process_sp->GetSystemRuntime();
|
SystemRuntime *runtime = process_sp->GetSystemRuntime();
|
||||||
std::vector<ConstString> names = runtime->GetThreadOriginExtendedBacktraceTypes();
|
std::vector<ConstString> names = runtime->GetExtendedBacktraceTypes();
|
||||||
if (idx < names.size())
|
if (idx < names.size())
|
||||||
{
|
{
|
||||||
return names[idx].AsCString();
|
return names[idx].AsCString();
|
||||||
|
@ -1287,7 +1287,7 @@ SBProcess::GetThreadOriginExtendedBacktraceTypeAtIndex (uint32_t idx)
|
||||||
{
|
{
|
||||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||||
if (log)
|
if (log)
|
||||||
log->Printf("SBProcess(%p)::GetThreadOriginExtendedBacktraceTypeAtIndex() => error: requested extended backtrace name out of bounds", process_sp.get());
|
log->Printf("SBProcess(%p)::GetExtendedBacktraceTypeAtIndex() => error: requested extended backtrace name out of bounds", process_sp.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -1283,7 +1283,7 @@ SBThread::GetDescription (SBStream &description) const
|
||||||
}
|
}
|
||||||
|
|
||||||
SBThread
|
SBThread
|
||||||
SBThread::GetThreadOriginExtendedBacktrace (const char *type)
|
SBThread::GetExtendedBacktrace (const char *type)
|
||||||
{
|
{
|
||||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||||
Mutex::Locker api_locker;
|
Mutex::Locker api_locker;
|
||||||
|
@ -1302,7 +1302,7 @@ SBThread::GetThreadOriginExtendedBacktrace (const char *type)
|
||||||
SystemRuntime *runtime = exe_ctx.GetProcessPtr()->GetSystemRuntime();
|
SystemRuntime *runtime = exe_ctx.GetProcessPtr()->GetSystemRuntime();
|
||||||
if (runtime)
|
if (runtime)
|
||||||
{
|
{
|
||||||
ThreadSP origin_thread = runtime->GetThreadOriginExtendedBacktrace (real_thread, type_const);
|
ThreadSP origin_thread = runtime->GetExtendedBacktrace (real_thread, type_const);
|
||||||
sb_origin_thread.SetThread (origin_thread);
|
sb_origin_thread.SetThread (origin_thread);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1310,7 +1310,7 @@ SBThread::GetThreadOriginExtendedBacktrace (const char *type)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (log)
|
if (log)
|
||||||
log->Printf ("SBThread(%p)::GetThreadOriginExtendedBacktrace() => error: process is running", exe_ctx.GetThreadPtr());
|
log->Printf ("SBThread(%p)::GetExtendedBacktrace() => error: process is running", exe_ctx.GetThreadPtr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,14 +60,14 @@ SystemRuntime::ModulesDidLoad (ModuleList &module_list)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<ConstString>
|
std::vector<ConstString>
|
||||||
SystemRuntime::GetThreadOriginExtendedBacktraceTypes ()
|
SystemRuntime::GetExtendedBacktraceTypes ()
|
||||||
{
|
{
|
||||||
std::vector<ConstString> types;
|
std::vector<ConstString> types;
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
ThreadSP
|
ThreadSP
|
||||||
SystemRuntime::GetThreadOriginExtendedBacktrace (ThreadSP thread, ConstString type)
|
SystemRuntime::GetExtendedBacktrace (ThreadSP thread, ConstString type)
|
||||||
{
|
{
|
||||||
return ThreadSP();
|
return ThreadSP();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue