1 //===-- RegisterInfoInterface.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_RegisterInfoInterface_h
11 #define lldb_RegisterInfoInterface_h
13 #include "lldb/Core/ArchSpec.h"
15 namespace lldb_private
18 ///------------------------------------------------------------------------------
19 /// @class RegisterInfoInterface
21 /// @brief RegisterInfo interface to patch RegisterInfo structure for archs.
22 ///------------------------------------------------------------------------------
23 class RegisterInfoInterface
26 RegisterInfoInterface(const lldb_private::ArchSpec& target_arch) : m_target_arch(target_arch) {}
27 virtual ~RegisterInfoInterface () {}
30 GetGPRSize () const = 0;
32 virtual const lldb_private::RegisterInfo *
33 GetRegisterInfo () const = 0;
35 // Returns the number of registers including the user registers and the
36 // lldb internal registers also
38 GetRegisterCount () const = 0;
40 // Returns the number of the user registers (excluding the registers
41 // kept for lldb internal use only). Subclasses should override it if
42 // they belongs to an architecture with lldb internal registers.
44 GetUserRegisterCount () const
46 return GetRegisterCount();
49 const lldb_private::ArchSpec&
50 GetTargetArchitecture() const
51 { return m_target_arch; }
54 // FIXME make private.
55 lldb_private::ArchSpec m_target_arch;