1 //===-- RegisterContextMinidump_ARM64.h -------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H
12 #include "MinidumpTypes.h"
14 #include "Plugins/Process/Utility/RegisterInfoInterface.h"
15 #include "lldb/Target/RegisterContext.h"
17 #include "llvm/ADT/ArrayRef.h"
18 #include "llvm/ADT/BitmaskEnum.h"
23 namespace lldb_private
{
27 LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
29 class RegisterContextMinidump_ARM64
: public lldb_private::RegisterContext
{
31 RegisterContextMinidump_ARM64(lldb_private::Thread
&thread
,
32 const DataExtractor
&data
);
34 ~RegisterContextMinidump_ARM64() override
= default;
36 void InvalidateAllRegisters() override
{
37 // Do nothing... registers are always valid...
40 size_t GetRegisterCount() override
;
42 const lldb_private::RegisterInfo
*GetRegisterInfoAtIndex(size_t reg
) override
;
44 size_t GetRegisterSetCount() override
;
46 const lldb_private::RegisterSet
*GetRegisterSet(size_t set
) override
;
48 const char *GetRegisterName(unsigned reg
);
50 bool ReadRegister(const RegisterInfo
*reg_info
,
51 RegisterValue
®_value
) override
;
53 bool WriteRegister(const RegisterInfo
*reg_info
,
54 const RegisterValue
®_value
) override
;
56 uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind
,
57 uint32_t num
) override
;
59 // Reference: see breakpad/crashpad source
61 uint64_t context_flags
;
67 uint8_t v
[32 * 16]; // 32 128-bit floating point registers
71 enum class Flags
: uint32_t {
72 ARM64_Flag
= 0x80000000,
73 Integer
= ARM64_Flag
| 0x00000002,
74 FloatingPoint
= ARM64_Flag
| 0x00000004,
75 LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ FloatingPoint
)
80 } // end namespace minidump
81 } // end namespace lldb_private
82 #endif // LLDB_SOURCE_PLUGINS_PROCESS_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H