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 
23 namespace lldb_private {
24 
25 namespace minidump {
26 
28 
30 public:
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;
67  uint8_t v[32 * 16]; // 32 128-bit floating point registers
68  };
69 
70 protected:
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)
76  };
78 };
79 
80 } // end namespace minidump
81 } // end namespace lldb_private
82 #endif // LLDB_SOURCE_PLUGINS_PROCESS_MINIDUMP_REGISTERCONTEXTMINIDUMP_ARM64_H
lldb_private::minidump::RegisterContextMinidump_ARM64
Definition: RegisterContextMinidump_ARM64.h:29
lldb_private::RegisterValue
Definition: RegisterValue.h:28
lldb_private::minidump::RegisterContextMinidump_ARM64::GetRegisterCount
size_t GetRegisterCount() override
Definition: RegisterContextMinidump_ARM64.cpp:780
lldb_private::minidump::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
lldb_private::minidump::RegisterContextMinidump_ARM64::Flags::ARM64_Flag
@ ARM64_Flag
MinidumpTypes.h
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::v
uint8_t v[32 *16]
Definition: RegisterContextMinidump_ARM64.h:67
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::fpsr
uint32_t fpsr
Definition: RegisterContextMinidump_ARM64.h:65
lldb_private::minidump::RegisterContextMinidump_ARM64::GetRegisterSetCount
size_t GetRegisterSetCount() override
Definition: RegisterContextMinidump_ARM64.cpp:789
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::fpcr
uint32_t fpcr
Definition: RegisterContextMinidump_ARM64.h:66
lldb_private::minidump::RegisterContextMinidump_ARM64::RegisterContextMinidump_ARM64
RegisterContextMinidump_ARM64(lldb_private::Thread &thread, const DataExtractor &data)
Definition: RegisterContextMinidump_ARM64.cpp:764
lldb_private::minidump::RegisterContextMinidump_ARM64::ConvertRegisterKindToRegisterNumber
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override
Convert from a given register numbering scheme to the lldb register numbering scheme.
Definition: RegisterContextMinidump_ARM64.cpp:819
lldb_private::minidump::RegisterContextMinidump_ARM64::~RegisterContextMinidump_ARM64
~RegisterContextMinidump_ARM64() override=default
RegisterInfoInterface.h
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::context_flags
uint64_t context_flags
Definition: RegisterContextMinidump_ARM64.h:61
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::Thread
Definition: Thread.h:60
lldb_private::minidump::RegisterContextMinidump_ARM64::GetRegisterInfoAtIndex
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
Definition: RegisterContextMinidump_ARM64.cpp:783
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::pc
uint64_t pc
Definition: RegisterContextMinidump_ARM64.h:63
lldb_private::minidump::RegisterContextMinidump_ARM64::WriteRegister
bool WriteRegister(const RegisterInfo *reg_info, const RegisterValue &reg_value) override
Definition: RegisterContextMinidump_ARM64.cpp:814
lldb_private::minidump::RegisterContextMinidump_ARM64::InvalidateAllRegisters
void InvalidateAllRegisters() override
Definition: RegisterContextMinidump_ARM64.h:36
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::x
uint64_t x[32]
Definition: RegisterContextMinidump_ARM64.h:62
set
set(option_framework FRAMEWORK) endif() if(LLDB_ENABLE_PYTHON) get_target_property(python_bindings_dir swig_wrapper_python BINARY_DIR) set(lldb_python_wrapper $
Definition: API/CMakeLists.txt:9
lldb_private::minidump::RegisterContextMinidump_ARM64::m_regs
Context m_regs
Definition: RegisterContextMinidump_ARM64.h:77
lldb_private::RegisterContext
Definition: RegisterContext.h:17
lldb_private::minidump::RegisterContextMinidump_ARM64::Flags
Flags
Definition: RegisterContextMinidump_ARM64.h:71
lldb::RegisterKind
RegisterKind
Register numbering types.
Definition: lldb-enumerations.h:227
uint32_t
lldb_private::minidump::RegisterContextMinidump_ARM64::Flags::Integer
@ Integer
lldb_private::minidump::RegisterContextMinidump_ARM64::Context
Definition: RegisterContextMinidump_ARM64.h:60
lldb_private::minidump::RegisterContextMinidump_ARM64::GetRegisterSet
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
Definition: RegisterContextMinidump_ARM64.cpp:793
lldb_private::minidump::RegisterContextMinidump_ARM64::GetRegisterName
const char * GetRegisterName(unsigned reg)
Definition: RegisterContextMinidump_ARM64.cpp:799
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::minidump::RegisterContextMinidump_ARM64::Flags::FloatingPoint
@ FloatingPoint
lldb_private::minidump::RegisterContextMinidump_ARM64::ReadRegister
bool ReadRegister(const RegisterInfo *reg_info, RegisterValue &reg_value) override
Definition: RegisterContextMinidump_ARM64.cpp:805
lldb_private::minidump::RegisterContextMinidump_ARM64::Context::cpsr
uint32_t cpsr
Definition: RegisterContextMinidump_ARM64.h:64
RegisterContext.h