xref: /openbsd-src/gnu/llvm/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp (revision 061da546b983eb767bad15e67af1174fb0bcf31c)
1 //===-- NativeRegisterContextWindows.cpp ------------------------*- 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 #include "lldb/Host/HostThread.h"
10 #include "lldb/Host/windows/HostThreadWindows.h"
11 #include "lldb/Host/windows/windows.h"
12 #include "lldb/Utility/Log.h"
13 
14 #include "NativeRegisterContextWindows.h"
15 #include "NativeThreadWindows.h"
16 #include "ProcessWindowsLog.h"
17 
18 using namespace lldb;
19 using namespace lldb_private;
20 
21 NativeRegisterContextWindows::NativeRegisterContextWindows(
22     NativeThreadProtocol &thread, RegisterInfoInterface *reg_info_interface_p)
23     : NativeRegisterContextRegisterInfo(thread, reg_info_interface_p) {}
24 
25 lldb::thread_t NativeRegisterContextWindows::GetThreadHandle() const {
26   auto wthread = static_cast<NativeThreadWindows *>(&m_thread);
27   return wthread->GetHostThread().GetNativeThread().GetSystemHandle();
28 }
29