23#if defined(__x86_64__) || defined(_M_AMD64)
25#elif defined(__i386__) || defined(_M_IX86)
27#elif defined(__aarch64__) || defined(_M_ARM64)
29#elif defined(__arm__) || defined(_M_ARM)
38 :
Thread(process, thread.GetNativeThread().GetThreadId()),
39 m_thread_reg_ctx_sp(), m_host_thread(thread) {}
62 RegisterContextSP reg_ctx_sp;
69 if (concrete_frame_idx == 0) {
71 ArchSpec arch = HostInfo::GetArchitecture();
73 case llvm::Triple::arm:
74 case llvm::Triple::thumb:
75#if defined(__arm__) || defined(_M_ARM)
77 new RegisterContextWindows_arm(*
this, concrete_frame_idx));
79 LLDB_LOG(log,
"debugging foreign targets is currently unsupported");
83 case llvm::Triple::aarch64:
84#if defined(__aarch64__) || defined(_M_ARM64)
86 new RegisterContextWindows_arm64(*
this, concrete_frame_idx));
88 LLDB_LOG(log,
"debugging foreign targets is currently unsupported");
92 case llvm::Triple::x86:
93#if defined(__i386__) || defined(_M_IX86)
95 new RegisterContextWindows_x86(*
this, concrete_frame_idx));
97 LLDB_LOG(log,
"debugging foreign targets is currently unsupported");
101 case llvm::Triple::x86_64:
102#if defined(__x86_64__) || defined(_M_AMD64)
104 new RegisterContextWindows_x64(*
this, concrete_frame_idx));
106 LLDB_LOG(log,
"debugging foreign targets is currently unsupported");
130 if (resume_state == current_state)
139 uint64_t flags_value =
142 const ArchSpec &arch = process->GetTarget().GetArchitecture();
144 case llvm::Triple::x86:
145 case llvm::Triple::x86_64:
146 flags_value |= 0x100;
148 case llvm::Triple::aarch64:
149 case llvm::Triple::arm:
150 case llvm::Triple::thumb:
151 flags_value |= 0x200000;
154 LLDB_LOG(log,
"single stepping unsupported on this architecture");
161 DWORD previous_suspend_count = 0;
168 previous_suspend_count = ::ResumeThread(thread_handle);
170 if (previous_suspend_count == (DWORD)-1)
173 }
while (previous_suspend_count > 1);
#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()
This base class provides an interface to stack frames.
uint32_t GetConcreteFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frame...
void RefreshStateAfterStop() override
bool CalculateStopInfo() override
TargetThreadWindows(ProcessWindows &process, const HostThread &thread)
virtual ~TargetThreadWindows()
lldb::RegisterContextSP GetRegisterContext() override
lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame) override
void WillResume(lldb::StateType resume_state) override
lldb::RegisterContextSP m_thread_reg_ctx_sp
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
virtual void DestroyThread()
virtual Unwind & GetUnwinder()
lldb::StateType GetTemporaryResumeState() const
void SetState(lldb::StateType state)
lldb::ProcessSP GetProcess() const
lldb::StopInfoSP m_stop_info_sp
The private stop reason for this thread.
lldb::StateType GetState() const
lldb::RegisterContextSP m_reg_context_sp
The register context for this thread's current register state.
lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame)
#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.
StateType
Process and Thread States.
@ eStateStopped
Process or thread is stopped and can be examined.
@ eStateRunning
Process or thread is running and can't be examined.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
@ eErrorTypeWin32
Standard Win32 error codes.
@ eRegisterKindGeneric
insn ptr reg, stack ptr reg, etc not specific to any particular target