summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Utility/HistoryThread.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /source/Plugins/Process/Utility/HistoryThread.h
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
Notes
Diffstat (limited to 'source/Plugins/Process/Utility/HistoryThread.h')
-rw-r--r--source/Plugins/Process/Utility/HistoryThread.h158
1 files changed, 58 insertions, 100 deletions
diff --git a/source/Plugins/Process/Utility/HistoryThread.h b/source/Plugins/Process/Utility/HistoryThread.h
index 43ac13c2d8bcb..1a4898a95b7dc 100644
--- a/source/Plugins/Process/Utility/HistoryThread.h
+++ b/source/Plugins/Process/Utility/HistoryThread.h
@@ -16,7 +16,6 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private.h"
#include "lldb/Core/Broadcaster.h"
#include "lldb/Core/Event.h"
#include "lldb/Core/UserID.h"
@@ -24,119 +23,78 @@
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/StackFrameList.h"
#include "lldb/Target/Thread.h"
+#include "lldb/lldb-private.h"
namespace lldb_private {
//----------------------------------------------------------------------
/// @class HistoryThread HistoryThread.h "HistoryThread.h"
-/// @brief A thread object representing a backtrace from a previous point in the process execution
+/// @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
+/// 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
-{
+class HistoryThread : public lldb_private::Thread {
public:
- HistoryThread (lldb_private::Process &process, lldb::tid_t tid, std::vector<lldb::addr_t> pcs, uint32_t stop_id, bool stop_id_is_valid);
-
- ~HistoryThread() override;
-
- lldb::RegisterContextSP
- GetRegisterContext() override;
-
- lldb::RegisterContextSP
- CreateRegisterContextForFrame(StackFrame *frame) override;
-
- void
- RefreshStateAfterStop() override { }
-
- bool
- CalculateStopInfo() override
- {
- return false;
- }
-
- void
- SetExtendedBacktraceToken(uint64_t token) override
- {
- m_extended_unwind_token = token;
- }
-
- uint64_t
- GetExtendedBacktraceToken() override
- {
- return m_extended_unwind_token;
- }
-
- const char *
- GetQueueName() override
- {
- return m_queue_name.c_str();
- }
-
- void
- SetQueueName(const char *name) override
- {
- m_queue_name = name;
- }
-
- lldb::queue_id_t
- GetQueueID() override
- {
- return m_queue_id;
- }
-
- void
- SetQueueID(lldb::queue_id_t queue) override
- {
- m_queue_id = queue;
- }
-
- const char *
- GetThreadName ()
- {
- return m_thread_name.c_str();
- }
-
- uint32_t
- GetExtendedBacktraceOriginatingIndexID() override;
-
- void
- SetThreadName (const char *name)
- {
- m_thread_name = name;
- }
-
- const char *
- GetName() override
- {
- return m_thread_name.c_str();
- }
-
- void
- SetName(const char *name) override
- {
- m_thread_name = name;
- }
+ HistoryThread(lldb_private::Process &process, lldb::tid_t tid,
+ std::vector<lldb::addr_t> pcs, uint32_t stop_id,
+ bool stop_id_is_valid);
+
+ ~HistoryThread() override;
+
+ lldb::RegisterContextSP GetRegisterContext() override;
+
+ lldb::RegisterContextSP
+ CreateRegisterContextForFrame(StackFrame *frame) override;
+
+ void RefreshStateAfterStop() override {}
+
+ bool CalculateStopInfo() override { return false; }
+
+ void SetExtendedBacktraceToken(uint64_t token) override {
+ m_extended_unwind_token = token;
+ }
+
+ uint64_t GetExtendedBacktraceToken() override {
+ return m_extended_unwind_token;
+ }
+
+ const char *GetQueueName() override { return m_queue_name.c_str(); }
+
+ void SetQueueName(const char *name) override { m_queue_name = name; }
+
+ lldb::queue_id_t GetQueueID() override { return m_queue_id; }
+
+ void SetQueueID(lldb::queue_id_t queue) override { m_queue_id = queue; }
+
+ const char *GetThreadName() { return m_thread_name.c_str(); }
+
+ uint32_t GetExtendedBacktraceOriginatingIndexID() override;
+
+ void SetThreadName(const char *name) { m_thread_name = name; }
+
+ const char *GetName() override { return m_thread_name.c_str(); }
+
+ void SetName(const char *name) override { m_thread_name = name; }
protected:
- virtual lldb::StackFrameListSP
- GetStackFrameList ();
-
- mutable std::mutex m_framelist_mutex;
- lldb::StackFrameListSP m_framelist;
- std::vector<lldb::addr_t> m_pcs;
- uint32_t m_stop_id;
- bool m_stop_id_is_valid;
-
- uint64_t m_extended_unwind_token;
- std::string m_queue_name;
- std::string m_thread_name;
- lldb::tid_t m_originating_unique_thread_id;
- lldb::queue_id_t m_queue_id;
+ virtual lldb::StackFrameListSP GetStackFrameList();
+
+ mutable std::mutex m_framelist_mutex;
+ lldb::StackFrameListSP m_framelist;
+ std::vector<lldb::addr_t> m_pcs;
+ uint32_t m_stop_id;
+ bool m_stop_id_is_valid;
+
+ uint64_t m_extended_unwind_token;
+ std::string m_queue_name;
+ std::string m_thread_name;
+ lldb::tid_t m_originating_unique_thread_id;
+ lldb::queue_id_t m_queue_id;
};
} // namespace lldb_private