1 //===-- RegisterContextMinidump_ARM.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 liblldb_RegisterContextMinidump_ARM_h_
10 #define liblldb_RegisterContextMinidump_ARM_h_
12 #include "MinidumpTypes.h"
14 #include "Plugins/Process/Utility/RegisterInfoInterface.h"
16 #include "lldb/Target/RegisterContext.h"
18 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/ADT/BitmaskEnum.h"
24 namespace lldb_private {
28 LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
30 class RegisterContextMinidump_ARM : public lldb_private::RegisterContext {
32 RegisterContextMinidump_ARM(lldb_private::Thread &thread,
33 const DataExtractor &data, bool apple);
35 ~RegisterContextMinidump_ARM() override = default;
37 void InvalidateAllRegisters() override {
38 // Do nothing... registers are always valid...
41 size_t GetRegisterCount() override;
43 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
45 size_t GetRegisterSetCount() override;
47 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
49 const char *GetRegisterName(unsigned reg);
51 bool ReadRegister(const RegisterInfo *reg_info,
52 RegisterValue ®_value) override;
54 bool WriteRegister(const RegisterInfo *reg_info,
55 const RegisterValue ®_value) override;
57 uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
58 uint32_t num) override;
60 // Reference: see breakpad/crashpad source
67 uint32_t context_flags;
80 enum class Flags : uint32_t {
81 ARM_Flag = 0x40000000,
82 Integer = ARM_Flag | 0x00000002,
83 FloatingPoint = ARM_Flag | 0x00000004,
84 LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ FloatingPoint)
87 const bool m_apple; // True if this is an Apple ARM where FP is R7
90 } // end namespace minidump
91 } // end namespace lldb_private
92 #endif // liblldb_RegisterContextMinidump_ARM_h_