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
21
23public:
25
26 ~NativeThreadWindows() override = default;
27
28 Status DoStop();
29 Status DoResume(lldb::StateType resume_state);
30
31 /// Whether the current resume single-steps this thread.
32 bool IsSingleStepping() const { return m_single_stepping; }
33
35
36 void SetSingleStepFlag();
37
38 std::string GetName() override;
39
40 lldb::StateType GetState() override { return m_state; }
41
45
46 bool GetStopReason(ThreadStopInfo &stop_info,
47 std::string &description) override;
48
49 Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
50 bool hardware) override;
51
53
54 Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
55
57
59
60 void SetStopReason(ThreadStopInfo stop_info, std::string description);
61
63
64protected:
66 std::string m_name;
67 bool m_single_stepping = false;
68 std::unique_ptr<NativeRegisterContextWindows> m_reg_context_up;
69 // Cache address and index of the watchpoints and hardware breakpoints since
70 // the register context does not.
71 using IndexMap = std::map<lldb::addr_t, uint32_t>;
75};
76} // namespace lldb_private
77
78#endif // #ifndef liblldb_NativeThreadWindows_h_
NativeThreadProtocol(NativeProcessProtocol &process, lldb::tid_t tid)
bool IsSingleStepping() const
Whether the current resume single-steps this thread.
StructuredData::ObjectSP GetExtendedInfo() const override
Status RemoveWatchpoint(lldb::addr_t addr) override
~NativeThreadWindows() override=default
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
NativeThreadWindows(NativeProcessWindows &process, const HostThread &thread)
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:118
std::shared_ptr< Object > ObjectSP
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