1 //===-- ThreadGDBRemote.h ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ThreadGDBRemote_h_
11 #define liblldb_ThreadGDBRemote_h_
15 #include "lldb/Core/StructuredData.h"
16 #include "lldb/Target/Process.h"
17 #include "lldb/Target/Thread.h"
19 class StringExtractor;
20 class ProcessGDBRemote;
22 class ThreadGDBRemote : public lldb_private::Thread
25 ThreadGDBRemote (lldb_private::Process &process, lldb::tid_t tid);
31 WillResume (lldb::StateType resume_state);
34 RefreshStateAfterStop();
42 virtual lldb::queue_id_t
49 GetQueueLibdispatchQueueAddress ();
51 virtual lldb::RegisterContextSP
52 GetRegisterContext ();
54 virtual lldb::RegisterContextSP
55 CreateRegisterContextForFrame (lldb_private::StackFrame *frame);
58 Dump (lldb_private::Log *log, uint32_t index);
61 ThreadIDIsValid (lldb::tid_t thread);
64 ShouldStop (bool &step_more);
67 GetBasicInfoAsString ();
70 SetName (const char *name)
73 m_thread_name.assign (name);
75 m_thread_name.clear();
79 GetThreadDispatchQAddr ()
81 return m_thread_dispatch_qaddr;
85 SetThreadDispatchQAddr (lldb::addr_t thread_dispatch_qaddr)
87 m_thread_dispatch_qaddr = thread_dispatch_qaddr;
90 lldb_private::StructuredData::ObjectSP
91 FetchThreadExtendedInfo ();
95 friend class ProcessGDBRemote;
98 PrivateSetRegisterValue (uint32_t reg,
99 StringExtractor &response);
101 //------------------------------------------------------------------
103 //------------------------------------------------------------------
104 std::string m_thread_name;
105 std::string m_dispatch_queue_name;
106 lldb::addr_t m_thread_dispatch_qaddr;
107 //------------------------------------------------------------------
109 //------------------------------------------------------------------
112 SetStopInfoFromPacket (StringExtractor &stop_packet, uint32_t stop_id);
115 CalculateStopInfo ();
120 #endif // liblldb_ThreadGDBRemote_h_