]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
Vendor import of lldb release_39 branch r287912:
[FreeBSD/FreeBSD.git] / source / Plugins / Process / Utility / RegisterContextFreeBSD_arm64.h
1 //===-- RegisterContextFreeBSD_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_RegisterContextFreeBSD_arm64_H_
11 #define liblldb_RegisterContextFreeBSD_arm64_H_
12
13 #include "RegisterInfoInterface.h"
14
15 class RegisterContextFreeBSD_arm64:
16     public lldb_private::RegisterInfoInterface
17 {
18 public:
19     // based on RegisterContextDarwin_arm64.h
20     struct GPR
21     {
22         uint64_t    x[29];  // x0-x28
23         uint64_t    fp;     // x29
24         uint64_t    lr;     // x30
25         uint64_t    sp;     // x31
26         uint64_t    pc;     // pc
27         uint32_t    cpsr;   // cpsr
28     };
29
30     // based on RegisterContextDarwin_arm64.h
31     struct VReg
32     {
33         uint8_t bytes[16];
34     };
35
36     // based on RegisterContextDarwin_arm64.h
37     struct FPU
38     {
39         VReg        v[32];
40         uint32_t    fpsr;
41         uint32_t    fpcr;
42     };
43
44     // based on RegisterContextDarwin_arm64.h
45     struct EXC
46     {
47         uint64_t    far;       // Virtual Fault Address
48         uint32_t    esr;       // Exception syndrome
49         uint32_t    exception; // number of arm exception token
50     };
51
52     // based on RegisterContextDarwin_arm64.h
53     struct DBG
54     {
55         uint64_t bvr[16];
56         uint64_t bcr[16];
57         uint64_t wvr[16];
58         uint64_t wcr[16];
59         uint64_t mdscr_el1;
60     };
61
62     RegisterContextFreeBSD_arm64(const lldb_private::ArchSpec &target_arch);
63
64     size_t
65     GetGPRSize() const override;
66
67     const lldb_private::RegisterInfo *
68     GetRegisterInfo() const override;
69
70     uint32_t
71     GetRegisterCount () const override;
72
73 private:
74     const lldb_private::RegisterInfo *m_register_info_p;
75     uint32_t m_register_info_count;
76 };
77
78 #endif