LLDB  mainline
NativeThreadProtocol.h
Go to the documentation of this file.
1 //===-- NativeThreadProtocol.h ----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_HOST_COMMON_NATIVETHREADPROTOCOL_H
10 #define LLDB_HOST_COMMON_NATIVETHREADPROTOCOL_H
11 
12 #include <memory>
13 
14 #include "lldb/Host/Debug.h"
16 #include "lldb/lldb-types.h"
17 
18 namespace lldb_private {
19 // NativeThreadProtocol
21 public:
23 
24  virtual ~NativeThreadProtocol() = default;
25 
26  virtual std::string GetName() = 0;
27 
28  virtual lldb::StateType GetState() = 0;
29 
31 
32  virtual bool GetStopReason(ThreadStopInfo &stop_info,
33  std::string &description) = 0;
34 
35  lldb::tid_t GetID() const { return m_tid; }
36 
38 
39  // Thread-specific watchpoints
40  virtual Status SetWatchpoint(lldb::addr_t addr, size_t size,
41  uint32_t watch_flags, bool hardware) = 0;
42 
43  virtual Status RemoveWatchpoint(lldb::addr_t addr) = 0;
44 
45  // Thread-specific Hardware Breakpoint routines
46  virtual Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) = 0;
47 
49 
50 protected:
53 };
54 }
55 
56 #endif // LLDB_HOST_COMMON_NATIVETHREADPROTOCOL_H
lldb_private::NativeThreadProtocol::RemoveHardwareBreakpoint
virtual Status RemoveHardwareBreakpoint(lldb::addr_t addr)=0
lldb_private::NativeThreadProtocol
Definition: NativeThreadProtocol.h:20
lldb_private::NativeThreadProtocol::GetProcess
NativeProcessProtocol & GetProcess()
Definition: NativeThreadProtocol.h:37
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::NativeThreadProtocol::RemoveWatchpoint
virtual Status RemoveWatchpoint(lldb::addr_t addr)=0
lldb-private-forward.h
lldb_private::NativeThreadProtocol::~NativeThreadProtocol
virtual ~NativeThreadProtocol()=default
lldb_private::NativeThreadProtocol::SetHardwareBreakpoint
virtual Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size)=0
lldb_private::NativeThreadProtocol::GetRegisterContext
virtual NativeRegisterContext & GetRegisterContext()=0
lldb_private::NativeThreadProtocol::GetStopReason
virtual bool GetStopReason(ThreadStopInfo &stop_info, std::string &description)=0
lldb_private::NativeThreadProtocol::GetState
virtual lldb::StateType GetState()=0
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::ThreadStopInfo
Definition: Debug.h:133
lldb_private::NativeThreadProtocol::NativeThreadProtocol
NativeThreadProtocol(NativeProcessProtocol &process, lldb::tid_t tid)
Definition: NativeThreadProtocol.cpp:17
lldb-types.h
lldb_private::Status
Definition: Status.h:44
uint32_t
lldb_private::NativeProcessProtocol
Definition: NativeProcessProtocol.h:47
lldb_private::NativeThreadProtocol::GetID
lldb::tid_t GetID() const
Definition: NativeThreadProtocol.h:35
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::NativeThreadProtocol::m_process
NativeProcessProtocol & m_process
Definition: NativeThreadProtocol.h:51
lldb_private::NativeThreadProtocol::GetName
virtual std::string GetName()=0
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::NativeRegisterContext
Definition: NativeRegisterContext.h:21
lldb_private::NativeThreadProtocol::SetWatchpoint
virtual Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware)=0
Debug.h
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::NativeThreadProtocol::m_tid
lldb::tid_t m_tid
Definition: NativeThreadProtocol.h:52