blob: 1a646c7da34cef2a39acf34cd1a50d41afc535cd [file] [log] [blame]
Jason Molenda02706c32013-11-08 04:59:54 +00001//===-- HistoryThread.h -----------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_HistoryThread_h_
11#define liblldb_HistoryThread_h_
12
13#include "lldb/lldb-private.h"
14#include "lldb/Host/Mutex.h"
15#include "lldb/Core/Broadcaster.h"
16#include "lldb/Core/Event.h"
17#include "lldb/Core/UserID.h"
18#include "lldb/Core/UserSettingsController.h"
19#include "lldb/Target/ExecutionContextScope.h"
20#include "lldb/Target/StackFrameList.h"
21#include "lldb/Target/Thread.h"
22
23namespace lldb_private {
24
25class HistoryThread : public lldb_private::Thread
26{
27public:
28 HistoryThread (lldb_private::Process &process, std::vector<lldb::addr_t> pcs, uint32_t stop_id, bool stop_id_is_valid);
29
30 virtual ~HistoryThread ();
31
32 virtual lldb::RegisterContextSP
33 GetRegisterContext ();
34
35 virtual lldb::RegisterContextSP
36 CreateRegisterContextForFrame (StackFrame *frame);
37
38 virtual void
39 RefreshStateAfterStop() { }
40
41 bool
42 CalculateStopInfo () { return false; }
43
Jason Molendaa7b5afa2013-11-15 00:17:32 +000044 void
45 SetExtendedBacktraceToken (uint64_t token)
46 {
47 m_extended_unwind_token = token;
48 }
49
50 uint64_t
51 GetExtendedBacktraceToken ()
52 {
53 return m_extended_unwind_token;
54 }
55
56 const char *
57 GetQueueName ()
58 {
59 return m_queue_name.c_str();
60 }
61
62 void
63 SetQueueName (const char *name)
64 {
65 m_queue_name = name;
66 }
67
Jason Molenda02706c32013-11-08 04:59:54 +000068protected:
69 virtual lldb::StackFrameListSP
70 GetStackFrameList ();
71
72 mutable Mutex m_framelist_mutex;
73 lldb::StackFrameListSP m_framelist;
74 std::vector<lldb::addr_t> m_pcs;
75 uint32_t m_stop_id;
76 bool m_stop_id_is_valid;
Jason Molendaa7b5afa2013-11-15 00:17:32 +000077
78 uint64_t m_extended_unwind_token;
79 std::string m_queue_name;
Jason Molenda02706c32013-11-08 04:59:54 +000080};
81
82} // namespace lldb_private
83
84#endif // liblldb_HistoryThread_h_