]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
Update to ELF Tool Chain r3490
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / Process / Utility / RegisterContextLinux_arm64.h
1 //===-- RegisterContextLinux_arm64.h ----------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_RegisterContextLinux_arm64_H_
11 #define liblldb_RegisterContextLinux_arm64_H_
12
13 #include "lldb/lldb-private.h"
14 #include "lldb/Target/RegisterContext.h"
15 #include "RegisterInfoInterface.h"
16
17 class RegisterContextLinux_arm64
18     : public lldb_private::RegisterInfoInterface
19 {
20 public:
21     // based on RegisterContextDarwin_arm64.h
22     struct GPR
23     {
24         uint64_t    x[29];  // x0-x28
25         uint64_t    fp;     // x29
26         uint64_t    lr;     // x30
27         uint64_t    sp;     // x31
28         uint64_t    pc;     // pc
29         uint32_t    cpsr;   // cpsr
30     };
31
32     // based on RegisterContextDarwin_arm64.h
33     struct VReg
34     {
35         uint8_t bytes[16];
36     };
37
38     // based on RegisterContextDarwin_arm64.h
39     struct FPU
40     {
41         VReg        v[32];
42         uint32_t    fpsr;
43         uint32_t    fpcr;
44     };
45
46     // based on RegisterContextDarwin_arm64.h
47     struct EXC
48     {
49         uint64_t    far;       // Virtual Fault Address
50         uint32_t    esr;       // Exception syndrome
51         uint32_t    exception; // number of arm exception token
52     };
53
54     // based on RegisterContextDarwin_arm64.h
55     struct DBG
56     {
57         uint64_t bvr[16];
58         uint64_t bcr[16];
59         uint64_t wvr[16];
60         uint64_t wcr[16];
61         uint64_t mdscr_el1;
62     };
63
64     RegisterContextLinux_arm64(const lldb_private::ArchSpec &target_arch);
65
66     size_t
67     GetGPRSize() const override;
68
69     const lldb_private::RegisterInfo *
70     GetRegisterInfo() const override;
71
72     uint32_t
73     GetRegisterCount () const override;
74
75 private:
76     const lldb_private::RegisterInfo *m_register_info_p;
77     uint32_t m_register_info_count;
78 };
79
80 #endif