[Lldb-commits] [lldb] r194045 - Add a GetThreadOriginExtendedBacktraceTypes method to the
Jason Molenda
jmolenda at apple.com
Mon Nov 4 20:25:58 PST 2013
Author: jmolenda
Date: Mon Nov 4 22:25:57 2013
New Revision: 194045
URL: http://llvm.org/viewvc/llvm-project?rev=194045&view=rev
Log:
Add a GetThreadOriginExtendedBacktraceTypes method to the
SystemRuntime class.
<rdar://problem/15314369>
Modified:
lldb/trunk/include/lldb/Target/SystemRuntime.h
lldb/trunk/source/Target/SystemRuntime.cpp
Modified: lldb/trunk/include/lldb/Target/SystemRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/SystemRuntime.h?rev=194045&r1=194044&r2=194045&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/SystemRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/SystemRuntime.h Mon Nov 4 22:25:57 2013
@@ -14,7 +14,10 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include <vector>
+
#include "lldb/lldb-public.h"
+#include "lldb/Core/ConstString.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/lldb-private.h"
@@ -100,12 +103,32 @@ public:
virtual void
ModulesDidLoad(lldb_private::ModuleList &module_list);
+
//------------------------------------------------------------------
- /// Call this method to print the backtrace of where this thread was
- /// enqueued, if at all. Returns the number of frames printed.
+ /// Return a list of thread origin extended backtraces that may
+ /// be available.
+ ///
+ /// A System Runtime may be able to provide a backtrace of when this
+ /// thread was originally created. Furthermore, it may be able to
+ /// provide that extended backtrace for different styles of creation.
+ /// On a system with both pthreads and libdispatch, aka Grand Central
+ /// Dispatch, queues, the system runtime may be able to provide the
+ /// pthread creation of the thread and it may also be able to provide
+ /// the backtrace of when this GCD queue work block was enqueued.
+ /// The caller may request these different origins by name.
+ ///
+ /// The names will be provided in the order that they are most likely
+ /// to be requested. For instance, a most natural order may be to
+ /// request the GCD libdispatch queue origin. If there is none, then
+ /// request the pthread origin.
+ ///
+ /// @return
+ /// A vector of ConstStrings with names like "pthread" or "libdispatch".
+ /// An empty vector may be returned if no thread origin extended
+ /// backtrace capabilities are available.
//------------------------------------------------------------------
- virtual uint32_t
- GetStatus (lldb_private::Stream &strm, lldb_private::ExecutionContext &exe_ctx);
+ virtual std::vector<ConstString>
+ GetThreadOriginExtendedBacktraceTypes ();
protected:
//------------------------------------------------------------------
Modified: lldb/trunk/source/Target/SystemRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/SystemRuntime.cpp?rev=194045&r1=194044&r2=194045&view=diff
==============================================================================
--- lldb/trunk/source/Target/SystemRuntime.cpp (original)
+++ lldb/trunk/source/Target/SystemRuntime.cpp Mon Nov 4 22:25:57 2013
@@ -59,9 +59,9 @@ SystemRuntime::ModulesDidLoad (ModuleLis
{
}
-uint32_t
-SystemRuntime::GetStatus (Stream &strm, ExecutionContext &exe_ctx)
+std::vector<ConstString>
+SystemRuntime::GetThreadOriginExtendedBacktraceTypes ()
{
- return 0;
+ std::vector<ConstString> types;
+ return types;
}
-
More information about the lldb-commits
mailing list