Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 1 | //===-- TargetThreadWindows.h -----------------------------------*- C++ -*-===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef liblldb_Plugins_Process_Windows_TargetThreadWindows_H_ |
| 10 | #define liblldb_Plugins_Process_Windows_TargetThreadWindows_H_ |
| 11 | |
| 12 | //#include "ForwardDecl.h" |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 13 | #include "lldb/Host/HostThread.h" |
| 14 | #include "lldb/Target/Thread.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 15 | #include "lldb/lldb-forward.h" |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 16 | |
Adrian McCarthy | 4ad5def | 2016-11-23 16:26:37 +0000 | [diff] [blame] | 17 | #include "RegisterContextWindows.h" |
| 18 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 19 | namespace lldb_private { |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 20 | class ProcessWindows; |
| 21 | class HostThread; |
| 22 | class StackFrame; |
| 23 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 24 | class TargetThreadWindows : public lldb_private::Thread { |
| 25 | public: |
| 26 | TargetThreadWindows(ProcessWindows &process, const HostThread &thread); |
| 27 | virtual ~TargetThreadWindows(); |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 28 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 29 | // lldb_private::Thread overrides |
| 30 | void RefreshStateAfterStop() override; |
| 31 | void WillResume(lldb::StateType resume_state) override; |
| 32 | void DidStop() override; |
Adrian McCarthy | 4ad5def | 2016-11-23 16:26:37 +0000 | [diff] [blame] | 33 | lldb::RegisterContextSP GetRegisterContext() override; |
| 34 | lldb::RegisterContextSP |
| 35 | CreateRegisterContextForFrame(StackFrame *frame) override; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 36 | bool CalculateStopInfo() override; |
| 37 | Unwind *GetUnwinder() override; |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 38 | |
Stella Stamenova | 0fd67b5 | 2018-05-17 21:34:24 +0000 | [diff] [blame] | 39 | Status DoResume(); |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 40 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 41 | HostThread GetHostThread() const { return m_host_thread; } |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 42 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 43 | private: |
Stella Stamenova | 45d8134 | 2018-07-10 22:05:33 +0000 | [diff] [blame] | 44 | lldb::RegisterContextSP m_thread_reg_ctx_sp; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 45 | HostThread m_host_thread; |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 46 | }; |
Stella Stamenova | 45d8134 | 2018-07-10 22:05:33 +0000 | [diff] [blame] | 47 | } // namespace lldb_private |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 48 | |
| 49 | #endif |