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