LLDB mainline
RegisterInfoLinux_s390x.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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
12#include "lldb/lldb-defines.h"
13
14using namespace lldb_private;
15using namespace lldb;
16
17// Include RegisterInfos_s390x to declare our g_register_infos_s390x structure.
18#define DECLARE_REGISTER_INFOS_S390X_STRUCT
20#undef DECLARE_REGISTER_INFOS_S390X_STRUCT
21
22static const RegisterInfo *GetRegisterInfoPtr(const ArchSpec &target_arch) {
23 switch (target_arch.GetMachine()) {
24 case llvm::Triple::systemz:
25 return g_register_infos_s390x;
26 default:
27 assert(false && "Unhandled target architecture.");
28 return nullptr;
29 }
30}
31
32static uint32_t GetRegisterInfoCount(const ArchSpec &target_arch) {
33 switch (target_arch.GetMachine()) {
34 case llvm::Triple::systemz:
36 default:
37 assert(false && "Unhandled target architecture.");
38 return 0;
39 }
40}
41
42static uint32_t GetUserRegisterInfoCount(const ArchSpec &target_arch) {
43 switch (target_arch.GetMachine()) {
44 case llvm::Triple::systemz:
46 default:
47 assert(false && "Unhandled target architecture.");
48 return 0;
49 }
50}
51
58
62
66
70
71size_t RegisterInfoLinux_s390x::GetGPRSize() const { return 0; }
static const RegisterInfo * GetRegisterInfoPtr(const ArchSpec &target_arch)
static uint32_t GetUserRegisterInfoCount(const ArchSpec &target_arch)
static uint32_t GetRegisterInfoCount(const ArchSpec &target_arch)
static uint32_t GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch)
static const lldb_private::RegisterInfo * GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch)
size_t GetGPRSize() const override
uint32_t GetRegisterCount() const override
const lldb_private::RegisterInfo * m_register_info_p
RegisterInfoLinux_s390x(const lldb_private::ArchSpec &target_arch)
uint32_t GetUserRegisterCount() const override
const lldb_private::RegisterInfo * GetRegisterInfo() const override
An architecture specification class.
Definition ArchSpec.h:32
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
Definition ArchSpec.cpp:886
RegisterInfoInterface(const lldb_private::ArchSpec &target_arch)
A class that represents a running process on the host machine.
Every register is described in detail including its name, alternate name (optional),...