1 //===-- RegisterContextWindows_x86.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_RegisterContextWindows_x86_H_ 10 #define liblldb_RegisterContextWindows_x86_H_ 11 12 #if defined(__i386__) || defined(_M_IX86) 13 14 #include "RegisterContextWindows.h" 15 #include "lldb/lldb-forward.h" 16 17 namespace lldb_private { 18 19 class Thread; 20 21 class RegisterContextWindows_x86 : public RegisterContextWindows { 22 public: 23 // Constructors and Destructors 24 RegisterContextWindows_x86(Thread &thread, uint32_t concrete_frame_idx); 25 26 virtual ~RegisterContextWindows_x86(); 27 28 // Subclasses must override these functions 29 size_t GetRegisterCount() override; 30 31 const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override; 32 33 size_t GetRegisterSetCount() override; 34 35 const RegisterSet *GetRegisterSet(size_t reg_set) override; 36 37 bool ReadRegister(const RegisterInfo *reg_info, 38 RegisterValue ®_value) override; 39 40 bool WriteRegister(const RegisterInfo *reg_info, 41 const RegisterValue ®_value) override; 42 43 private: 44 bool ReadRegisterHelper(DWORD flags_required, const char *reg_name, 45 DWORD value, RegisterValue ®_value) const; 46 }; 47 } 48 49 #endif // defined(__i386__) || defined(_M_IX86) 50 51 #endif // #ifndef liblldb_RegisterContextWindows_x86_H_ 52