LLDB mainline
RegisterContextMinidump_ARM64.h
Go to the documentation of this file.
1//===-- RegisterContextMinidump_ARM64.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_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H
11
12#include "MinidumpTypes.h"
13
16
17#include "llvm/ADT/ArrayRef.h"
18#include "llvm/ADT/BitmaskEnum.h"
19
20// C includes
21// C++ includes
22
23namespace lldb_private {
24
25namespace minidump {
26
28
30public:
32 const DataExtractor &data);
33
34 ~RegisterContextMinidump_ARM64() override = default;
35
36 void InvalidateAllRegisters() override {
37 // Do nothing... registers are always valid...
38 }
39
40 size_t GetRegisterCount() override;
41
42 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
43
44 size_t GetRegisterSetCount() override;
45
46 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
47
48 const char *GetRegisterName(unsigned reg);
49
50 bool ReadRegister(const RegisterInfo *reg_info,
51 RegisterValue &reg_value) override;
52
53 bool WriteRegister(const RegisterInfo *reg_info,
54 const RegisterValue &reg_value) override;
55
57 uint32_t num) override;
58
59 // Reference: see breakpad/crashpad source
60 struct Context {
61 uint64_t context_flags;
62 uint64_t x[32];
63 uint64_t pc;
64 uint32_t cpsr;
65 uint32_t fpsr;
66 uint32_t fpcr;
67 uint8_t v[32 * 16]; // 32 128-bit floating point registers
68 };
69
70 enum class Flags : uint32_t {
71 ARM64_Flag = 0x80000000,
72 Integer = ARM64_Flag | 0x00000002,
73 FloatingPoint = ARM64_Flag | 0x00000004,
74 LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ FloatingPoint)
75 };
76
77protected:
79};
80
81} // end namespace minidump
82} // end namespace lldb_private
83#endif // LLDB_SOURCE_PLUGINS_PROCESS_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H
An data extractor class.
Definition: DataExtractor.h:48
bool ReadRegister(const RegisterInfo *reg_info, RegisterValue &reg_value) override
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
bool WriteRegister(const RegisterInfo *reg_info, const RegisterValue &reg_value) override
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override
Convert from a given register numbering scheme to the lldb register numbering scheme.
A class that represents a running process on the host machine.
RegisterKind
Register numbering types.
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.