This revision was automatically updated to reflect the committed changes.
Closed by commit rL287916: Merge Linux and FreeBSD arm64 register contexts 
(authored by labath).

Changed prior to commit:
  https://reviews.llvm.org/D25947?vs=75718&id=79286#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25947

Files:
  lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
  lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
  lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
  lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
  lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
  lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp

Index: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -15,16 +15,15 @@
 #include "lldb/Target/Unwind.h"
 
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
-#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_arm.h"
-#include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_s390x.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
 #include "ProcessElfCore.h"
 #include "RegisterContextPOSIXCore_arm.h"
 #include "RegisterContextPOSIXCore_arm64.h"
@@ -86,7 +85,7 @@
     case llvm::Triple::FreeBSD: {
       switch (arch.GetMachine()) {
       case llvm::Triple::aarch64:
-        reg_interface = new RegisterContextFreeBSD_arm64(arch);
+        reg_interface = new RegisterInfoPOSIX_arm64(arch);
         break;
       case llvm::Triple::arm:
         reg_interface = new RegisterContextFreeBSD_arm(arch);
@@ -118,7 +117,7 @@
         reg_interface = new RegisterContextLinux_arm(arch);
         break;
       case llvm::Triple::aarch64:
-        reg_interface = new RegisterContextLinux_arm64(arch);
+        reg_interface = new RegisterInfoPOSIX_arm64(arch);
         break;
       case llvm::Triple::systemz:
         reg_interface = new RegisterContextLinux_s390x(arch);
Index: lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
+++ lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
@@ -19,11 +19,11 @@
 #include "FreeBSDThread.h"
 #include "POSIXStopInfo.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
-#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
 #include "Plugins/Process/Utility/UnwindLLDB.h"
 #include "ProcessFreeBSD.h"
 #include "ProcessMonitor.h"
@@ -135,7 +135,7 @@
     assert(target_arch.GetTriple().getOS() == llvm::Triple::FreeBSD);
     switch (target_arch.GetMachine()) {
     case llvm::Triple::aarch64:
-      reg_interface = new RegisterContextFreeBSD_arm64(target_arch);
+      reg_interface = new RegisterInfoPOSIX_arm64(target_arch);
       break;
     case llvm::Triple::arm:
       reg_interface = new RegisterContextFreeBSD_arm(target_arch);
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
@@ -0,0 +1,70 @@
+//===-- RegisterInfoPOSIX_arm64.h -------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_RegisterContextLinux_arm64_H_
+#define liblldb_RegisterContextLinux_arm64_H_
+
+#include "RegisterInfoInterface.h"
+#include "lldb/Target/RegisterContext.h"
+#include "lldb/lldb-private.h"
+
+class RegisterInfoPOSIX_arm64 : public lldb_private::RegisterInfoInterface {
+public:
+  // based on RegisterContextDarwin_arm64.h
+  struct GPR {
+    uint64_t x[29]; // x0-x28
+    uint64_t fp;    // x29
+    uint64_t lr;    // x30
+    uint64_t sp;    // x31
+    uint64_t pc;    // pc
+    uint32_t cpsr;  // cpsr
+  };
+
+  // based on RegisterContextDarwin_arm64.h
+  struct VReg {
+    uint8_t bytes[16];
+  };
+
+  // based on RegisterContextDarwin_arm64.h
+  struct FPU {
+    VReg v[32];
+    uint32_t fpsr;
+    uint32_t fpcr;
+  };
+
+  // based on RegisterContextDarwin_arm64.h
+  struct EXC {
+    uint64_t far;       // Virtual Fault Address
+    uint32_t esr;       // Exception syndrome
+    uint32_t exception; // number of arm exception token
+  };
+
+  // based on RegisterContextDarwin_arm64.h
+  struct DBG {
+    uint64_t bvr[16];
+    uint64_t bcr[16];
+    uint64_t wvr[16];
+    uint64_t wcr[16];
+    uint64_t mdscr_el1;
+  };
+
+  RegisterInfoPOSIX_arm64(const lldb_private::ArchSpec &target_arch);
+
+  size_t GetGPRSize() const override;
+
+  const lldb_private::RegisterInfo *GetRegisterInfo() const override;
+
+  uint32_t GetRegisterCount() const override;
+
+private:
+  const lldb_private::RegisterInfo *m_register_info_p;
+  uint32_t m_register_info_count;
+};
+
+#endif
Index: lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
+++ lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt
@@ -16,14 +16,12 @@
   RegisterContextDarwin_x86_64.cpp
   RegisterContextDummy.cpp
   RegisterContextFreeBSD_arm.cpp
-  RegisterContextFreeBSD_arm64.cpp
   RegisterContextFreeBSD_i386.cpp
   RegisterContextFreeBSD_mips64.cpp
   RegisterContextFreeBSD_powerpc.cpp
   RegisterContextFreeBSD_x86_64.cpp
   RegisterContextHistory.cpp
   RegisterContextLinux_arm.cpp
-  RegisterContextLinux_arm64.cpp
   RegisterContextLinux_i386.cpp
   RegisterContextLinux_x86_64.cpp
   RegisterContextLinux_mips64.cpp
@@ -43,6 +41,7 @@
   RegisterContextPOSIX_s390x.cpp
   RegisterContextPOSIX_x86.cpp
   RegisterContextThreadMemory.cpp
+  RegisterInfoPOSIX_arm64.cpp
   StopInfoMachException.cpp
   ThreadMemory.cpp
   UnwindLLDB.cpp
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
@@ -0,0 +1,99 @@
+//===-- RegisterInfoPOSIX_arm64.cpp ----------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===---------------------------------------------------------------------===//
+
+#include <cassert>
+#include <stddef.h>
+#include <vector>
+
+#include "lldb/lldb-defines.h"
+#include "llvm/Support/Compiler.h"
+
+#include "RegisterInfoPOSIX_arm64.h"
+
+// Based on RegisterContextDarwin_arm64.cpp
+#define GPR_OFFSET(idx) ((idx)*8)
+#define GPR_OFFSET_NAME(reg)                                                   \
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::GPR, reg))
+
+#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterInfoPOSIX_arm64::GPR))
+#define FPU_OFFSET_NAME(reg)                                                   \
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::FPU, reg) +                \
+   sizeof(RegisterInfoPOSIX_arm64::GPR))
+
+#define EXC_OFFSET_NAME(reg)                                                   \
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::EXC, reg) +                \
+   sizeof(RegisterInfoPOSIX_arm64::GPR) +                                      \
+   sizeof(RegisterInfoPOSIX_arm64::FPU))
+#define DBG_OFFSET_NAME(reg)                                                   \
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm64::DBG, reg) +                \
+   sizeof(RegisterInfoPOSIX_arm64::GPR) +                                      \
+   sizeof(RegisterInfoPOSIX_arm64::FPU) +                                      \
+   sizeof(RegisterInfoPOSIX_arm64::EXC))
+
+#define DEFINE_DBG(reg, i)                                                     \
+  #reg, NULL,                                                                  \
+      sizeof(((RegisterInfoPOSIX_arm64::DBG *) NULL)->reg[i]),                 \
+              DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex,  \
+                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
+                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
+                               dbg_##reg##i },                                 \
+                               NULL, NULL, NULL, 0
+#define REG_CONTEXT_SIZE                                                       \
+  (sizeof(RegisterInfoPOSIX_arm64::GPR) +                                      \
+   sizeof(RegisterInfoPOSIX_arm64::FPU) +                                      \
+   sizeof(RegisterInfoPOSIX_arm64::EXC))
+
+//-----------------------------------------------------------------------------
+// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
+//-----------------------------------------------------------------------------
+#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
+#include "RegisterInfos_arm64.h"
+#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
+
+static const lldb_private::RegisterInfo *
+GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {
+  switch (target_arch.GetMachine()) {
+  case llvm::Triple::aarch64:
+    return g_register_infos_arm64_le;
+  default:
+    assert(false && "Unhandled target architecture.");
+    return NULL;
+  }
+}
+
+static uint32_t
+GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {
+  switch (target_arch.GetMachine()) {
+  case llvm::Triple::aarch64:
+    return static_cast<uint32_t>(sizeof(g_register_infos_arm64_le) /
+                                 sizeof(g_register_infos_arm64_le[0]));
+  default:
+    assert(false && "Unhandled target architecture.");
+    return 0;
+  }
+}
+
+RegisterInfoPOSIX_arm64::RegisterInfoPOSIX_arm64(
+    const lldb_private::ArchSpec &target_arch)
+    : lldb_private::RegisterInfoInterface(target_arch),
+      m_register_info_p(GetRegisterInfoPtr(target_arch)),
+      m_register_info_count(GetRegisterInfoCount(target_arch)) {}
+
+size_t RegisterInfoPOSIX_arm64::GetGPRSize() const {
+  return sizeof(struct RegisterInfoPOSIX_arm64::GPR);
+}
+
+const lldb_private::RegisterInfo *
+RegisterInfoPOSIX_arm64::GetRegisterInfo() const {
+  return m_register_info_p;
+}
+
+uint32_t RegisterInfoPOSIX_arm64::GetRegisterCount() const {
+  return m_register_info_count;
+}
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp
@@ -1,95 +0,0 @@
-//===-- RegisterContextFreeBSD_arm64.cpp ----------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include "RegisterContextFreeBSD_arm64.h"
-#include "RegisterContextPOSIX_arm64.h"
-#include <vector>
-
-using namespace lldb;
-
-// Based on RegisterContextDarwin_arm64.cpp
-#define GPR_OFFSET(idx) ((idx)*8)
-#define GPR_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::GPR, reg))
-
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextFreeBSD_arm64::GPR))
-#define FPU_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::FPU, reg))
-
-#define EXC_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::EXC, reg) +           \
-   sizeof(RegisterContextFreeBSD_arm64::GPR) +                                 \
-   sizeof(RegisterContextFreeBSD_arm64::FPU))
-#define DBG_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextFreeBSD_arm64::DBG, reg) +           \
-   sizeof(RegisterContextFreeBSD_arm64::GPR) +                                 \
-   sizeof(RegisterContextFreeBSD_arm64::FPU) +                                 \
-   sizeof(RegisterContextFreeBSD_arm64::EXC))
-
-#define DEFINE_DBG(reg, i)                                                     \
-  #reg, NULL,                                                                  \
-      sizeof(((RegisterContextFreeBSD_arm64::DBG *) NULL)->reg[i]),            \
-              DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex,  \
-                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
-                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
-                               dbg_##reg##i },                                 \
-                               NULL, NULL, NULL, 0
-#define REG_CONTEXT_SIZE                                                       \
-  (sizeof(RegisterContextFreeBSD_arm64::GPR) +                                 \
-   sizeof(RegisterContextFreeBSD_arm64::FPU) +                                 \
-   sizeof(RegisterContextFreeBSD_arm64::EXC))
-
-//-----------------------------------------------------------------------------
-// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
-//-----------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
-#include "RegisterInfos_arm64.h"
-#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
-
-static const lldb_private::RegisterInfo *
-GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {
-  switch (target_arch.GetMachine()) {
-  case llvm::Triple::aarch64:
-    return g_register_infos_arm64_le;
-  default:
-    assert(false && "Unhandled target architecture.");
-    return nullptr;
-  }
-}
-
-static uint32_t
-GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {
-  switch (target_arch.GetMachine()) {
-  case llvm::Triple::aarch64:
-    return static_cast<uint32_t>(sizeof(g_register_infos_arm64_le) /
-                                 sizeof(g_register_infos_arm64_le[0]));
-  default:
-    assert(false && "Unhandled target architecture.");
-    return 0;
-  }
-}
-
-RegisterContextFreeBSD_arm64::RegisterContextFreeBSD_arm64(
-    const lldb_private::ArchSpec &target_arch)
-    : RegisterInfoInterface(target_arch),
-      m_register_info_p(GetRegisterInfoPtr(target_arch)),
-      m_register_info_count(GetRegisterInfoCount(target_arch)) {}
-
-size_t RegisterContextFreeBSD_arm64::GetGPRSize() const {
-  return sizeof(struct RegisterContextFreeBSD_arm64::GPR);
-}
-
-const lldb_private::RegisterInfo *
-RegisterContextFreeBSD_arm64::GetRegisterInfo() const {
-  return m_register_info_p;
-}
-
-uint32_t RegisterContextFreeBSD_arm64::GetRegisterCount() const {
-  return m_register_info_count;
-}
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp
@@ -1,99 +0,0 @@
-//===-- RegisterContextLinux_arm64.cpp -------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===---------------------------------------------------------------------===//
-
-#include <cassert>
-#include <stddef.h>
-#include <vector>
-
-#include "lldb/lldb-defines.h"
-#include "llvm/Support/Compiler.h"
-
-#include "RegisterContextLinux_arm64.h"
-
-// Based on RegisterContextDarwin_arm64.cpp
-#define GPR_OFFSET(idx) ((idx)*8)
-#define GPR_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::GPR, reg))
-
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextLinux_arm64::GPR))
-#define FPU_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::FPU, reg) +             \
-   sizeof(RegisterContextLinux_arm64::GPR))
-
-#define EXC_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::EXC, reg) +             \
-   sizeof(RegisterContextLinux_arm64::GPR) +                                   \
-   sizeof(RegisterContextLinux_arm64::FPU))
-#define DBG_OFFSET_NAME(reg)                                                   \
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_arm64::DBG, reg) +             \
-   sizeof(RegisterContextLinux_arm64::GPR) +                                   \
-   sizeof(RegisterContextLinux_arm64::FPU) +                                   \
-   sizeof(RegisterContextLinux_arm64::EXC))
-
-#define DEFINE_DBG(reg, i)                                                     \
-  #reg, NULL,                                                                  \
-      sizeof(((RegisterContextLinux_arm64::DBG *) NULL)->reg[i]),              \
-              DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex,  \
-                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
-                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
-                               dbg_##reg##i },                                 \
-                               NULL, NULL, NULL, 0
-#define REG_CONTEXT_SIZE                                                       \
-  (sizeof(RegisterContextLinux_arm64::GPR) +                                   \
-   sizeof(RegisterContextLinux_arm64::FPU) +                                   \
-   sizeof(RegisterContextLinux_arm64::EXC))
-
-//-----------------------------------------------------------------------------
-// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
-//-----------------------------------------------------------------------------
-#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
-#include "RegisterInfos_arm64.h"
-#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
-
-static const lldb_private::RegisterInfo *
-GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {
-  switch (target_arch.GetMachine()) {
-  case llvm::Triple::aarch64:
-    return g_register_infos_arm64_le;
-  default:
-    assert(false && "Unhandled target architecture.");
-    return NULL;
-  }
-}
-
-static uint32_t
-GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {
-  switch (target_arch.GetMachine()) {
-  case llvm::Triple::aarch64:
-    return static_cast<uint32_t>(sizeof(g_register_infos_arm64_le) /
-                                 sizeof(g_register_infos_arm64_le[0]));
-  default:
-    assert(false && "Unhandled target architecture.");
-    return 0;
-  }
-}
-
-RegisterContextLinux_arm64::RegisterContextLinux_arm64(
-    const lldb_private::ArchSpec &target_arch)
-    : lldb_private::RegisterInfoInterface(target_arch),
-      m_register_info_p(GetRegisterInfoPtr(target_arch)),
-      m_register_info_count(GetRegisterInfoCount(target_arch)) {}
-
-size_t RegisterContextLinux_arm64::GetGPRSize() const {
-  return sizeof(struct RegisterContextLinux_arm64::GPR);
-}
-
-const lldb_private::RegisterInfo *
-RegisterContextLinux_arm64::GetRegisterInfo() const {
-  return m_register_info_p;
-}
-
-uint32_t RegisterContextLinux_arm64::GetRegisterCount() const {
-  return m_register_info_count;
-}
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h
@@ -1,69 +0,0 @@
-//===-- RegisterContextFreeBSD_arm64.h --------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextFreeBSD_arm64_H_
-#define liblldb_RegisterContextFreeBSD_arm64_H_
-
-#include "RegisterInfoInterface.h"
-
-class RegisterContextFreeBSD_arm64
-    : public lldb_private::RegisterInfoInterface {
-public:
-  // based on RegisterContextDarwin_arm64.h
-  struct GPR {
-    uint64_t x[29]; // x0-x28
-    uint64_t fp;    // x29
-    uint64_t lr;    // x30
-    uint64_t sp;    // x31
-    uint64_t pc;    // pc
-    uint32_t cpsr;  // cpsr
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct VReg {
-    uint8_t bytes[16];
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct FPU {
-    VReg v[32];
-    uint32_t fpsr;
-    uint32_t fpcr;
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct EXC {
-    uint64_t far;       // Virtual Fault Address
-    uint32_t esr;       // Exception syndrome
-    uint32_t exception; // number of arm exception token
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct DBG {
-    uint64_t bvr[16];
-    uint64_t bcr[16];
-    uint64_t wvr[16];
-    uint64_t wcr[16];
-    uint64_t mdscr_el1;
-  };
-
-  RegisterContextFreeBSD_arm64(const lldb_private::ArchSpec &target_arch);
-
-  size_t GetGPRSize() const override;
-
-  const lldb_private::RegisterInfo *GetRegisterInfo() const override;
-
-  uint32_t GetRegisterCount() const override;
-
-private:
-  const lldb_private::RegisterInfo *m_register_info_p;
-  uint32_t m_register_info_count;
-};
-
-#endif
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
===================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h
@@ -1,70 +0,0 @@
-//===-- RegisterContextLinux_arm64.h ----------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_RegisterContextLinux_arm64_H_
-#define liblldb_RegisterContextLinux_arm64_H_
-
-#include "RegisterInfoInterface.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/lldb-private.h"
-
-class RegisterContextLinux_arm64 : public lldb_private::RegisterInfoInterface {
-public:
-  // based on RegisterContextDarwin_arm64.h
-  struct GPR {
-    uint64_t x[29]; // x0-x28
-    uint64_t fp;    // x29
-    uint64_t lr;    // x30
-    uint64_t sp;    // x31
-    uint64_t pc;    // pc
-    uint32_t cpsr;  // cpsr
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct VReg {
-    uint8_t bytes[16];
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct FPU {
-    VReg v[32];
-    uint32_t fpsr;
-    uint32_t fpcr;
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct EXC {
-    uint64_t far;       // Virtual Fault Address
-    uint32_t esr;       // Exception syndrome
-    uint32_t exception; // number of arm exception token
-  };
-
-  // based on RegisterContextDarwin_arm64.h
-  struct DBG {
-    uint64_t bvr[16];
-    uint64_t bcr[16];
-    uint64_t wvr[16];
-    uint64_t wcr[16];
-    uint64_t mdscr_el1;
-  };
-
-  RegisterContextLinux_arm64(const lldb_private::ArchSpec &target_arch);
-
-  size_t GetGPRSize() const override;
-
-  const lldb_private::RegisterInfo *GetRegisterInfo() const override;
-
-  uint32_t GetRegisterCount() const override;
-
-private:
-  const lldb_private::RegisterInfo *m_register_info_p;
-  uint32_t m_register_info_count;
-};
-
-#endif
Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -25,7 +25,7 @@
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/Procfs.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-#include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
 
 // System includes - They have to be included after framework includes because
 // they define some
@@ -138,7 +138,7 @@
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread,
     uint32_t concrete_frame_idx)
     : NativeRegisterContextLinux(native_thread, concrete_frame_idx,
-                                 new RegisterContextLinux_arm64(target_arch)) {
+                                 new RegisterInfoPOSIX_arm64(target_arch)) {
   switch (target_arch.GetMachine()) {
   case llvm::Triple::aarch64:
     m_reg_info.num_registers = k_num_registers_arm64;
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to