summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-02-05 05:44:54 +0000
committerJason Molenda <jmolenda@apple.com>2014-02-05 05:44:54 +0000
commit2fd83355a837da553efe170439c054d3c70a68ee (patch)
tree40c46e628fc4560d92a166e9abfc14c0b289371e /lldb/source/Plugins/Process
parent7ca1d180559f3f5ceef45387cfeaa70a82280602 (diff)
downloadbcm5719-llvm-2fd83355a837da553efe170439c054d3c70a68ee.tar.gz
bcm5719-llvm-2fd83355a837da553efe170439c054d3c70a68ee.zip
Change the Mac OS X SystemRuntime plugin from using the placeholder
libldi library to collect extended backtrace information; switch to the libBacktraceRecording library and its APIs. Complete the work of adding QueueItems to Queues and allow for the QueueItems to be interrogated about their extended backtraces in turn. There's still cleanup and documentation to do on this code but the code is functional and I it's a good time to get the work-in-progress checked in. <rdar://problem/15314027> llvm-svn: 200822
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/Utility/HistoryThread.cpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/HistoryThread.h10
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp13
3 files changed, 18 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/Utility/HistoryThread.cpp b/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
index 521136295fd..d045bc7e10d 100644
--- a/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
+++ b/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
@@ -25,7 +25,7 @@ HistoryThread::HistoryThread (lldb_private::Process &process,
std::vector<lldb::addr_t> pcs,
uint32_t stop_id,
bool stop_id_is_valid) :
- Thread (process, LLDB_INVALID_THREAD_ID),
+ Thread (process, tid),
m_framelist_mutex(),
m_framelist(),
m_pcs (pcs),
diff --git a/lldb/source/Plugins/Process/Utility/HistoryThread.h b/lldb/source/Plugins/Process/Utility/HistoryThread.h
index 01fdd160870..f9a431d8340 100644
--- a/lldb/source/Plugins/Process/Utility/HistoryThread.h
+++ b/lldb/source/Plugins/Process/Utility/HistoryThread.h
@@ -22,6 +22,16 @@
namespace lldb_private {
+//----------------------------------------------------------------------
+/// @class HistoryThread HistoryThread.h "HistoryThread.h"
+/// @brief A thread object representing a backtrace from a previous point in the process execution
+///
+/// This subclass of Thread is used to provide a backtrace from earlier in
+/// process execution. It is given a backtrace list of pc addresses and
+/// optionally a stop_id of when those pc addresses were collected, and it will
+/// create stack frames for them.
+//----------------------------------------------------------------------
+
class HistoryThread : public lldb_private::Thread
{
public:
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
index 4e475c80bda..fb524deda81 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
@@ -19,6 +19,7 @@
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StopInfo.h"
+#include "lldb/Target/SystemRuntime.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Unwind.h"
@@ -74,10 +75,10 @@ ThreadGDBRemote::GetQueueName ()
ProcessSP process_sp (GetProcess());
if (process_sp)
{
- PlatformSP platform_sp (process_sp->GetTarget().GetPlatform());
- if (platform_sp)
+ SystemRuntime *runtime = process_sp->GetSystemRuntime ();
+ if (runtime)
{
- m_dispatch_queue_name = platform_sp->GetQueueNameForThreadQAddress (process_sp.get(), m_thread_dispatch_qaddr);
+ m_dispatch_queue_name = runtime->GetQueueNameFromThreadQAddress (m_thread_dispatch_qaddr);
}
if (m_dispatch_queue_name.length() > 0)
{
@@ -96,10 +97,10 @@ ThreadGDBRemote::GetQueueID ()
ProcessSP process_sp (GetProcess());
if (process_sp)
{
- PlatformSP platform_sp (process_sp->GetTarget().GetPlatform());
- if (platform_sp)
+ SystemRuntime *runtime = process_sp->GetSystemRuntime ();
+ if (runtime)
{
- return platform_sp->GetQueueIDForThreadQAddress (process_sp.get(), m_thread_dispatch_qaddr);
+ return runtime->GetQueueIDFromThreadQAddress (m_thread_dispatch_qaddr);
}
}
}
OpenPOWER on IntegriCloud