LLDB mainline
NativeRegisterContextRegisterInfo.cpp
Go to the documentation of this file.
1//===-- NativeRegisterContextRegisterInfo.cpp -----------------------------===//
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
11#include "lldb/lldb-types.h"
12
13using namespace lldb_private;
14
17 RegisterInfoInterface *register_info_interface)
18 : NativeRegisterContext(thread),
19 m_register_info_interface_up(register_info_interface) {
20 assert(register_info_interface && "null register_info_interface");
21}
22
24 return m_register_info_interface_up->GetRegisterCount();
25}
26
28 return m_register_info_interface_up->GetUserRegisterCount();
29}
30
32 uint32_t reg_index) const {
33 if (reg_index <= GetRegisterCount())
34 return m_register_info_interface_up->GetRegisterInfo() + reg_index;
35 else
36 return nullptr;
37}
38
42}
const RegisterInfo * GetRegisterInfoAtIndex(uint32_t reg_index) const override
NativeRegisterContextRegisterInfo(NativeThreadProtocol &thread, RegisterInfoInterface *register_info_interface)
Construct a NativeRegisterContextRegisterInfo, taking ownership of the register_info_interface pointe...
std::unique_ptr< RegisterInfoInterface > m_register_info_interface_up
RegisterInfo interface to patch RegisterInfo structure for archs.
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),...