LLDB mainline
RegisterInfoPOSIXDynamic_riscv32.h
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
9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIXDYNAMIC_RISCV32_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIXDYNAMIC_RISCV32_H
11
15#include "lldb/lldb-private.h"
16#include "llvm/ADT/ArrayRef.h"
17#include "llvm/ADT/SmallVector.h"
18#include "llvm/ADT/StringRef.h"
19
22public:
24
25 size_t GetGPRSize() const override;
26
27 size_t GetFPRSize() const override;
28
29 const lldb_private::RegisterInfo *GetRegisterInfo() const override;
30
31 uint32_t GetRegisterCount() const override;
32
34 GetRegisterSet(size_t reg_set) const override;
35
36 size_t GetRegisterSetCount() const override;
37
38 size_t GetRegisterSetFromRegisterIndex(uint32_t reg_index) const override;
39
40 size_t SetRegisterInfo(
41 std::vector<lldb_private::DynamicRegisterInfo::Register> regs);
42
44 GetRegisterInfo(llvm::StringRef reg_name) const;
45
46 /// Builds CS register information entries for 32-bit RISC-V debug targets on
47 /// the basis of the enabled ISA extensions.
48 ///
49 /// Construct a baseline CSR container, \p cs_reg_infos , and apply extension
50 /// patches in a deterministic order so that the final CSR metadata depends
51 /// only on \p features and conflict resolution is predictable.
52 static void BuildCSRegInfos(
53 llvm::ArrayRef<std::string> features,
55
56private:
59
60 /// Applies the CS register information patch set for a given feature.
61 ///
62 /// Override a baseline CSR metadata container, \p cs_reg_infos , with
63 /// feature-specific definitions by looking up the patch list for \p feature
64 /// and updating only the affected CSR entries in-place.
65 static void ConfigureCSRegInfos(
66 llvm::StringRef feature,
68};
69
70#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOPOSIXDYNAMIC_RISCV32_H
const lldb_private::RegisterSet * GetRegisterSet(size_t reg_set) const override
static void ConfigureCSRegInfos(llvm::StringRef feature, llvm::SmallVectorImpl< lldb_private::RegisterInfo > &cs_reg_infos)
Applies the CS register information patch set for a given feature.
RegisterInfoPOSIXDynamic_riscv32(const lldb_private::ArchSpec &target_arch)
size_t SetRegisterInfo(std::vector< lldb_private::DynamicRegisterInfo::Register > regs)
const lldb_private::RegisterInfo * GetRegisterInfo() const override
lldb_private::DynamicRegisterInfo m_dyn_reg_infos
size_t GetRegisterSetFromRegisterIndex(uint32_t reg_index) const override
static void BuildCSRegInfos(llvm::ArrayRef< std::string > features, llvm::SmallVectorImpl< lldb_private::RegisterInfo > &cs_reg_infos)
Builds CS register information entries for 32-bit RISC-V debug targets on the basis of the enabled IS...
An architecture specification class.
Definition ArchSpec.h:32
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.