28 m_stop_info(), m_stop_description(), m_host_thread(thread) {
36 DWORD previous_suspend_count =
38 if (previous_suspend_count == (DWORD)-1)
48 if (resume_state == current_state)
54 uint32_t flags_index =
57 uint64_t flags_value =
62 case llvm::Triple::x86:
63 case llvm::Triple::x86_64:
66 case llvm::Triple::aarch64:
67 case llvm::Triple::arm:
68 case llvm::Triple::thumb:
69 flags_value |= 0x200000;
72 LLDB_LOG(log,
"single stepping unsupported on this architecture");
79 DWORD previous_suspend_count = 0;
86 previous_suspend_count = ::ResumeThread(thread_handle);
88 if (previous_suspend_count == (DWORD)-1)
91 }
while (previous_suspend_count > 1);
107 std::string process_name(process_info.
GetName());
114 std::string description) {
121 std::string &description) {
142 log->
Printf(
"NativeThreadWindows::%s tid %" PRIu64
143 " in state %s cannot answer stop reason",
148 llvm_unreachable(
"unhandled StateType!");
152 uint32_t watch_flags,
bool hardware) {
172 uint32_t wp_index = wp->second;
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
An architecture specification class.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
lldb::thread_t GetSystemHandle() const
HostNativeThread & GetNativeThread()
static bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info)
void void Printf(const char *format,...) __attribute__((format(printf
Prefer using LLDB_LOGF whenever possible.
lldb::pid_t GetID() const
virtual const ArchSpec & GetArchitecture() const =0
const ArchSpec & GetArchitecture() const override
static std::unique_ptr< NativeRegisterContextWindows > CreateHostNativeRegisterContextWindows(const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
uint32_t ConvertRegisterKindToRegisterNumber(uint32_t kind, uint32_t num) const
lldb::addr_t ReadRegisterAsUnsigned(uint32_t reg, lldb::addr_t fail_value)
Status WriteRegisterFromUnsigned(uint32_t reg, uint64_t uval)
NativeProcessProtocol & GetProcess()
lldb::tid_t GetID() const
ThreadStopInfo m_stop_info
IndexMap m_watchpoint_index_map
std::string m_stop_description
std::string GetName() override
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)
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
const char * GetName() const
static Status FromErrorString(const char *str)
#define LLDB_INVALID_INDEX32
#define LLDB_REGNUM_GENERIC_FLAGS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
StateType
Process and Thread States.
@ eStateUnloaded
Process is object is valid, but not currently loaded.
@ eStateConnected
Process is connected to remote debug services, but not launched or attached to anything yet.
@ eStateDetached
Process has been detached and can't be examined.
@ eStateStopped
Process or thread is stopped and can be examined.
@ eStateSuspended
Process or thread is in a suspended state as far as the debugger is concerned while other processes o...
@ eStateRunning
Process or thread is running and can't be examined.
@ eStateLaunching
Process is in the process of launching.
@ eStateAttaching
Process is currently trying to attach.
@ eStateExited
Process has exited and can't be examined.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
@ eStateCrashed
Process or thread has crashed and can be examined.
@ eErrorTypeWin32
Standard Win32 error codes.
@ eRegisterKindGeneric
insn ptr reg, stack ptr reg, etc not specific to any particular target