1 //===-- NativeRegisterContextRegisterInfo.h ---------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLDB_PLUGINS_PROCESS_UTIILTY_NATIVE_REGISTER_CONTEXT_REGISTER_INFO 11 #define LLDB_PLUGINS_PROCESS_UTIILTY_NATIVE_REGISTER_CONTEXT_REGISTER_INFO 12 13 #include <memory> 14 15 #include "RegisterInfoInterface.h" 16 #include "lldb/Host/common/NativeRegisterContext.h" 17 18 namespace lldb_private { 19 class NativeRegisterContextRegisterInfo : public NativeRegisterContext { 20 public: 21 /// 22 /// Construct a NativeRegisterContextRegisterInfo, taking ownership 23 /// of the register_info_interface pointer. 24 /// 25 NativeRegisterContextRegisterInfo( 26 NativeThreadProtocol &thread, 27 RegisterInfoInterface *register_info_interface); 28 29 uint32_t GetRegisterCount() const override; 30 31 uint32_t GetUserRegisterCount() const override; 32 33 const RegisterInfo *GetRegisterInfoAtIndex(uint32_t reg_index) const override; 34 35 const RegisterInfoInterface &GetRegisterInfoInterface() const; 36 37 private: 38 std::unique_ptr<RegisterInfoInterface> m_register_info_interface_up; 39 }; 40 } 41 #endif 42