LLDB mainline
RegisterInfoInterface.h
Go to the documentation of this file.
1//===-- RegisterInfoInterface.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 LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOINTERFACE_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOINTERFACE_H
11
14#include <vector>
15
16namespace lldb_private {
17
18/// \class RegisterInfoInterface
19///
20/// RegisterInfo interface to patch RegisterInfo structure for archs.
22public:
24 : m_target_arch(target_arch) {}
25 virtual ~RegisterInfoInterface() = default;
26
27 virtual size_t GetGPRSize() const = 0;
28
29 virtual const lldb_private::RegisterInfo *GetRegisterInfo() const = 0;
30
31 // Returns the number of registers including the user registers and the
32 // lldb internal registers also
33 virtual uint32_t GetRegisterCount() const = 0;
34
35 // Returns the number of the user registers (excluding the registers
36 // kept for lldb internal use only). Subclasses should override it if
37 // they belongs to an architecture with lldb internal registers.
38 virtual uint32_t GetUserRegisterCount() const { return GetRegisterCount(); }
39
41 return m_target_arch;
42 }
43
44private:
46};
47} // namespace lldb_private
48
49#endif
An architecture specification class.
Definition: ArchSpec.h:31
RegisterInfo interface to patch RegisterInfo structure for archs.
virtual uint32_t GetRegisterCount() const =0
virtual ~RegisterInfoInterface()=default
virtual uint32_t GetUserRegisterCount() const
const lldb_private::ArchSpec & GetTargetArchitecture() const
virtual size_t GetGPRSize() const =0
virtual const lldb_private::RegisterInfo * GetRegisterInfo() const =0
RegisterInfoInterface(const lldb_private::ArchSpec &target_arch)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Every register is described in detail including its name, alternate name (optional),...