LLDB mainline
RegisterContextPOSIX_loongarch64.cpp
Go to the documentation of this file.
1//===-- RegisterContextPOSIX_loongarch64.cpp --------------------*- 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
10#include "lldb/Target/Target.h"
11#include "lldb/Target/Thread.h"
14#include "lldb/Utility/Endian.h"
16#include "lldb/Utility/Scalar.h"
17#include "llvm/Support/Compiler.h"
18
20
21using namespace lldb;
22using namespace lldb_private;
23
26 std::unique_ptr<RegisterInfoPOSIX_loongarch64> register_info)
27 : lldb_private::RegisterContext(thread, 0),
28 m_register_info_up(std::move(register_info)) {}
29
31
33
35
37 return m_register_info_up->GetRegisterCount();
38}
39
41 return m_register_info_up->GetGPRSize();
42}
43
45 return m_register_info_up->GetRegisterInfo()[reg].byte_size;
46}
47
49 return m_register_info_up->GetRegisterInfo()[reg].byte_offset;
50}
51
54 if (reg < GetRegisterCount())
55 return &GetRegisterInfo()[reg];
56
57 return nullptr;
58}
59
61 return m_register_info_up->GetRegisterCount();
62}
63
66 return m_register_info_up->GetRegisterSet(set);
67}
68
71 return m_register_info_up->GetRegisterInfo();
72}
73
75 return m_register_info_up->GetRegisterSetFromRegisterIndex(reg) ==
77}
78
80 return m_register_info_up->GetRegisterSetFromRegisterIndex(reg) ==
82}
RegisterContextPOSIX_loongarch64(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_loongarch64 > register_info)
std::unique_ptr< RegisterInfoPOSIX_loongarch64 > m_register_info_up
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
virtual unsigned GetRegisterOffset(unsigned reg)
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.