1 //===-- NativeThreadProtocol.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_NativeThreadProtocol_h_
11 #define liblldb_NativeThreadProtocol_h_
15 #include "lldb/lldb-private-forward.h"
16 #include "lldb/lldb-types.h"
17 #include "lldb/Host/Debug.h"
19 namespace lldb_private
21 //------------------------------------------------------------------
22 // NativeThreadProtocol
23 //------------------------------------------------------------------
24 class NativeThreadProtocol:
25 public std::enable_shared_from_this<NativeThreadProtocol>
28 NativeThreadProtocol (NativeProcessProtocol *process, lldb::tid_t tid);
30 virtual ~NativeThreadProtocol()
37 virtual lldb::StateType
40 virtual NativeRegisterContextSP
41 GetRegisterContext () = 0;
44 ReadRegister (uint32_t reg, RegisterValue ®_value);
47 WriteRegister (uint32_t reg, const RegisterValue ®_value);
50 SaveAllRegisters (lldb::DataBufferSP &data_sp);
53 RestoreAllRegisters (lldb::DataBufferSP &data_sp);
56 GetStopReason (ThreadStopInfo &stop_info, std::string& description) = 0;
64 NativeProcessProtocolSP
67 // ---------------------------------------------------------------------
68 // Thread-specific watchpoints
69 // ---------------------------------------------------------------------
71 SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) = 0;
74 RemoveWatchpoint (lldb::addr_t addr) = 0;
77 NativeProcessProtocolWP m_process_wp;
82 #endif // #ifndef liblldb_NativeThreadProtocol_h_