LLDB mainline
NativeThreadWindows.h
Go to the documentation of this file.
1//===-- NativeThreadWindows.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 liblldb_NativeThreadWindows_h_
10#define liblldb_NativeThreadWindows_h_
11
15
17
18namespace lldb_private {
19
20class NativeProcessWindows;
21
23public:
25
27
28 Status DoStop();
29 Status DoResume(lldb::StateType resume_state);
30
31 std::string GetName() override;
32
33 lldb::StateType GetState() override { return m_state; }
34
36 return *m_reg_context_up;
37 }
38
39 bool GetStopReason(ThreadStopInfo &stop_info,
40 std::string &description) override;
41
42 Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
43 bool hardware) override;
44
46
47 Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
48
50
51 void SetStopReason(ThreadStopInfo stop_info, std::string description);
52
54
55protected:
57 std::string m_name;
59 std::string m_stop_description;
60 std::unique_ptr<NativeRegisterContextWindows> m_reg_context_up;
61 // Cache address and index of the watchpoints and hardware breakpoints since
62 // the register context does not.
63 using IndexMap = std::map<lldb::addr_t, uint32_t>;
67};
68} // namespace lldb_private
69
70#endif // #ifndef liblldb_NativeThreadWindows_h_
Status RemoveWatchpoint(lldb::addr_t addr) override
Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) override
void SetStopReason(ThreadStopInfo stop_info, std::string description)
Status DoResume(lldb::StateType resume_state)
std::map< lldb::addr_t, uint32_t > IndexMap
bool GetStopReason(ThreadStopInfo &stop_info, std::string &description) override
NativeRegisterContextWindows & GetRegisterContext() override
lldb::StateType GetState() override
Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override
std::unique_ptr< NativeRegisterContextWindows > m_reg_context_up
Status RemoveHardwareBreakpoint(lldb::addr_t addr) override
An error handling class.
Definition: Status.h:115
A class that represents a running process on the host machine.
StateType
Process and Thread States.
uint64_t addr_t
Definition: lldb-types.h:80