aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Utility/RegisterInfoInterface.h
blob: 382475f4523ad6099e66ea1de2b74973a9a9eb40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===-- RegisterInfoInterface.h --------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef lldb_RegisterInfoInterface_h
#define lldb_RegisterInfoInterface_h

#include "lldb/Core/ArchSpec.h"

namespace lldb_private
{

    ///------------------------------------------------------------------------------
    /// @class RegisterInfoInterface
    ///
    /// @brief RegisterInfo interface to patch RegisterInfo structure for archs.
    ///------------------------------------------------------------------------------
    class RegisterInfoInterface
    {
    public:
        RegisterInfoInterface(const lldb_private::ArchSpec& target_arch) : m_target_arch(target_arch) {}
        virtual ~RegisterInfoInterface () {}

        virtual size_t
        GetGPRSize () const = 0;

        virtual const lldb_private::RegisterInfo *
        GetRegisterInfo () const = 0;

        virtual uint32_t
        GetRegisterCount () const = 0;

        const lldb_private::ArchSpec&
        GetTargetArchitecture() const
            { return m_target_arch; }

    public:
        // FIXME make private.
        lldb_private::ArchSpec m_target_arch;
    };

}

#endif