1 //===-- RegisterNumber.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 liblldb_RegisterNumber_h
11 #define liblldb_RegisterNumber_h
13 #include "lldb/lldb-private.h"
16 //--------------------------------------------------------------------
17 /// A class to represent register numbers, and able to convert between
18 /// different register numbering schemes that may be used in a single
20 //--------------------------------------------------------------------
22 class RegisterNumber {
24 RegisterNumber (lldb_private::Thread &thread, lldb::RegisterKind kind, uint32_t num);
26 // This constructor plus the init() method below allow for the placeholder
27 // creation of an invalid object initially, possibly to be filled in. It
28 // would be more consistent to have three Set* methods to set the three
29 // data that the object needs.
33 init (lldb_private::Thread &thread, lldb::RegisterKind kind, uint32_t num);
35 const RegisterNumber &
36 operator = (const RegisterNumber &rhs);
39 operator == (RegisterNumber &rhs);
42 operator != (RegisterNumber &rhs);
48 GetAsKind (lldb::RegisterKind kind);
51 GetRegisterNumber () const;
54 GetRegisterKind () const;
60 typedef std::map<lldb::RegisterKind, uint32_t> Collection;
62 lldb::RegisterContextSP m_reg_ctx_sp;
64 lldb::RegisterKind m_kind;
65 Collection m_kind_regnum_map;
69 #endif // liblldb_RegisterNumber_h