<div dir="ltr"><div>This appears to have broken Darwin here:</div><div><br></div><div><a href="http://lab.llvm.org:8080/green/job/lldb_build_test/22487/">http://lab.llvm.org:8080/green/job/lldb_build_test/22487/</a></div><div><br></div><div>through to current build:</div><div><br></div><div><a href="http://lab.llvm.org:8080/green/job/lldb_build_test/22545/">http://lab.llvm.org:8080/green/job/lldb_build_test/22545/</a><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 25, 2016 at 2:28 AM, Pavel Labath via lldb-commits <span dir="ltr"><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: labath<br>
Date: Fri Nov 25 04:28:09 2016<br>
New Revision: 287916<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=287916&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=287916&view=rev</a><br>
Log:<br>
Merge Linux and FreeBSD arm64 register contexts<br>
<br>
Summary:<br>
This is a test-the-water change about possibilities of reducing duplication in<br>
the register context definitions.<br>
<br>
I've named the new class RegisterInfoPOSIX, as RegisterContextPOSIX was already<br>
taken :(.  The two files were identical except for a fix by Tamas in D12636,<br>
which was applied to the Linux version only, which fixed a discrepancy between<br>
the definitions of fpsr and fpcr on one hand, and all other floating point<br>
register definitions on the other.<br>
<br>
Linux test suite still passes after this change. For freebsd, make the floating<br>
point register behavior consistent, but I don't know whether it will be<br>
consistently fixed, or consistently broken. By eyeballing the code, I have a<br>
feeling that a similar fix to D12636 will be required in<br>
RegisterContextPOSIXProcessMon<wbr>itor_arm64::ReadRegister, but I can't be sure as I<br>
have no way to test it (the assert in that function should fire upon accessing<br>
the registers if it is wrong though).<br>
<br>
Reviewers: emaste, clayborg<br>
<br>
Subscribers: aemerson, rengolin, beanz, mgorny, modocache, dmikulin, lldb-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D25947" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D25947</a><br>
<br>
Added:<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.cpp<br>
      - copied, changed from r287896, lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.cpp<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h<br>
      - copied, changed from r287896, lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h<br>
Removed:<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>cpp<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.h<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.cpp<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h<br>
Modified:<br>
    lldb/trunk/source/Plugins/<wbr>Process/FreeBSD/FreeBSDThread.<wbr>cpp<br>
    lldb/trunk/source/Plugins/<wbr>Process/Linux/<wbr>NativeRegisterContextLinux_<wbr>arm64.cpp<br>
    lldb/trunk/source/Plugins/<wbr>Process/Utility/CMakeLists.txt<br>
    lldb/trunk/source/Plugins/<wbr>Process/elf-core/<wbr>ThreadElfCore.cpp<br>
<br>
Modified: lldb/trunk/source/Plugins/<wbr>Process/FreeBSD/FreeBSDThread.<wbr>cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp?rev=287916&r1=287915&r2=287916&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/FreeBSD/<wbr>FreeBSDThread.cpp?rev=287916&<wbr>r1=287915&r2=287916&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/FreeBSD/FreeBSDThread.<wbr>cpp (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/FreeBSD/FreeBSDThread.<wbr>cpp Fri Nov 25 04:28:09 2016<br>
@@ -19,11 +19,11 @@<br>
 #include "FreeBSDThread.h"<br>
 #include "POSIXStopInfo.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_arm.h"<br>
-#include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_i386.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_mips64.<wbr>h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_<wbr>powerpc.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_x86_64.<wbr>h"<br>
+#include "Plugins/Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h"<br>
 #include "Plugins/Process/Utility/<wbr>UnwindLLDB.h"<br>
 #include "ProcessFreeBSD.h"<br>
 #include "ProcessMonitor.h"<br>
@@ -135,7 +135,7 @@ lldb::RegisterContextSP FreeBSDThread::G<br>
     assert(target_arch.GetTriple()<wbr>.getOS() == llvm::Triple::FreeBSD);<br>
     switch (target_arch.GetMachine()) {<br>
     case llvm::Triple::aarch64:<br>
-      reg_interface = new RegisterContextFreeBSD_arm64(<wbr>target_arch);<br>
+      reg_interface = new RegisterInfoPOSIX_arm64(<wbr>target_arch);<br>
       break;<br>
     case llvm::Triple::arm:<br>
       reg_interface = new RegisterContextFreeBSD_arm(<wbr>target_arch);<br>
<br>
Modified: lldb/trunk/source/Plugins/<wbr>Process/Linux/<wbr>NativeRegisterContextLinux_<wbr>arm64.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp?rev=287916&r1=287915&r2=287916&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Linux/<wbr>NativeRegisterContextLinux_<wbr>arm64.cpp?rev=287916&r1=<wbr>287915&r2=287916&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Linux/<wbr>NativeRegisterContextLinux_<wbr>arm64.cpp (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Linux/<wbr>NativeRegisterContextLinux_<wbr>arm64.cpp Fri Nov 25 04:28:09 2016<br>
@@ -25,7 +25,7 @@<br>
 #include "Plugins/Process/Linux/<wbr>NativeProcessLinux.h"<br>
 #include "Plugins/Process/Linux/Procfs.<wbr>h"<br>
 #include "Plugins/Process/POSIX/<wbr>ProcessPOSIXLog.h"<br>
-#include "Plugins/Process/Utility/<wbr>RegisterContextLinux_arm64.h"<br>
+#include "Plugins/Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h"<br>
<br>
 // System includes - They have to be included after framework includes because<br>
 // they define some<br>
@@ -138,7 +138,7 @@ NativeRegisterContextLinux_<wbr>arm64::Native<br>
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread,<br>
     uint32_t concrete_frame_idx)<br>
     : NativeRegisterContextLinux(<wbr>native_thread, concrete_frame_idx,<br>
-                                 new RegisterContextLinux_arm64(<wbr>target_arch)) {<br>
+                                 new RegisterInfoPOSIX_arm64(<wbr>target_arch)) {<br>
   switch (target_arch.GetMachine()) {<br>
   case llvm::Triple::aarch64:<br>
     m_reg_info.num_registers = k_num_registers_arm64;<br>
<br>
Modified: lldb/trunk/source/Plugins/<wbr>Process/Utility/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt?rev=287916&r1=287915&r2=287916&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>CMakeLists.txt?rev=287916&r1=<wbr>287915&r2=287916&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/CMakeLists.txt (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/CMakeLists.txt Fri Nov 25 04:28:09 2016<br>
@@ -16,14 +16,12 @@ add_lldb_library(<wbr>lldbPluginProcessUtilit<br>
   RegisterContextDarwin_x86_64.<wbr>cpp<br>
   RegisterContextDummy.cpp<br>
   RegisterContextFreeBSD_arm.cpp<br>
-  RegisterContextFreeBSD_arm64.<wbr>cpp<br>
   RegisterContextFreeBSD_i386.<wbr>cpp<br>
   RegisterContextFreeBSD_mips64.<wbr>cpp<br>
   RegisterContextFreeBSD_<wbr>powerpc.cpp<br>
   RegisterContextFreeBSD_x86_64.<wbr>cpp<br>
   RegisterContextHistory.cpp<br>
   RegisterContextLinux_arm.cpp<br>
-  RegisterContextLinux_arm64.cpp<br>
   RegisterContextLinux_i386.cpp<br>
   RegisterContextLinux_x86_64.<wbr>cpp<br>
   RegisterContextLinux_mips64.<wbr>cpp<br>
@@ -43,6 +41,7 @@ add_lldb_library(<wbr>lldbPluginProcessUtilit<br>
   RegisterContextPOSIX_s390x.cpp<br>
   RegisterContextPOSIX_x86.cpp<br>
   RegisterContextThreadMemory.<wbr>cpp<br>
+  RegisterInfoPOSIX_arm64.cpp<br>
   StopInfoMachException.cpp<br>
   ThreadMemory.cpp<br>
   UnwindLLDB.cpp<br>
<br>
Removed: lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp?rev=287915&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>cpp?rev=287915&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>cpp (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>cpp (removed)<br>
@@ -1,95 +0,0 @@<br>
-//===-- RegisterContextFreeBSD_arm64.<wbr>cpp ----------------------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===------------------------<wbr>------------------------------<wbr>---------------===//<br>
-<br>
-#include "RegisterContextFreeBSD_arm64.<wbr>h"<br>
-#include "RegisterContextPOSIX_arm64.h"<br>
-#include <vector><br>
-<br>
-using namespace lldb;<br>
-<br>
-// Based on RegisterContextDarwin_arm64.<wbr>cpp<br>
-#define GPR_OFFSET(idx) ((idx)*8)<br>
-#define GPR_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(<wbr>RegisterContextFreeBSD_arm64::<wbr>GPR, reg))<br>
-<br>
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextFreeBSD_<wbr>arm64::GPR))<br>
-#define FPU_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(<wbr>RegisterContextFreeBSD_arm64::<wbr>FPU, reg))<br>
-<br>
-#define EXC_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(<wbr>RegisterContextFreeBSD_arm64::<wbr>EXC, reg) +           \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::GPR) +                                 \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::FPU))<br>
-#define DBG_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(<wbr>RegisterContextFreeBSD_arm64::<wbr>DBG, reg) +           \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::GPR) +                                 \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::FPU) +                                 \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::EXC))<br>
-<br>
-#define DEFINE_DBG(reg, i)                                                     \<br>
-  #reg, NULL,                                                                  \<br>
-      sizeof(((<wbr>RegisterContextFreeBSD_arm64::<wbr>DBG *) NULL)->reg[i]),            \<br>
-              DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex,  \<br>
-                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \<br>
-                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \<br>
-                               dbg_##reg##i },                                 \<br>
-                               NULL, NULL, NULL, 0<br>
-#define REG_CONTEXT_SIZE                                                       \<br>
-  (sizeof(<wbr>RegisterContextFreeBSD_arm64::<wbr>GPR) +                                 \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::FPU) +                                 \<br>
-   sizeof(RegisterContextFreeBSD_<wbr>arm64::EXC))<br>
-<br>
-//---------------------------<wbr>------------------------------<wbr>--------------------<br>
-// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.<br>
-//---------------------------<wbr>------------------------------<wbr>--------------------<br>
-#define DECLARE_REGISTER_INFOS_ARM64_<wbr>STRUCT<br>
-#include "RegisterInfos_arm64.h"<br>
-#undef DECLARE_REGISTER_INFOS_ARM64_<wbr>STRUCT<br>
-<br>
-static const lldb_private::RegisterInfo *<br>
-GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {<br>
-  switch (target_arch.GetMachine()) {<br>
-  case llvm::Triple::aarch64:<br>
-    return g_register_infos_arm64_le;<br>
-  default:<br>
-    assert(false && "Unhandled target architecture.");<br>
-    return nullptr;<br>
-  }<br>
-}<br>
-<br>
-static uint32_t<br>
-GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {<br>
-  switch (target_arch.GetMachine()) {<br>
-  case llvm::Triple::aarch64:<br>
-    return static_cast<uint32_t>(sizeof(<wbr>g_register_infos_arm64_le) /<br>
-                                 sizeof(g_register_infos_arm64_<wbr>le[0]));<br>
-  default:<br>
-    assert(false && "Unhandled target architecture.");<br>
-    return 0;<br>
-  }<br>
-}<br>
-<br>
-RegisterContextFreeBSD_arm64:<wbr>:RegisterContextFreeBSD_arm64(<br>
-    const lldb_private::ArchSpec &target_arch)<br>
-    : RegisterInfoInterface(target_<wbr>arch),<br>
-      m_register_info_p(<wbr>GetRegisterInfoPtr(target_<wbr>arch)),<br>
-      m_register_info_count(<wbr>GetRegisterInfoCount(target_<wbr>arch)) {}<br>
-<br>
-size_t RegisterContextFreeBSD_arm64::<wbr>GetGPRSize() const {<br>
-  return sizeof(struct RegisterContextFreeBSD_arm64::<wbr>GPR);<br>
-}<br>
-<br>
-const lldb_private::RegisterInfo *<br>
-RegisterContextFreeBSD_arm64:<wbr>:GetRegisterInfo() const {<br>
-  return m_register_info_p;<br>
-}<br>
-<br>
-uint32_t RegisterContextFreeBSD_arm64::<wbr>GetRegisterCount() const {<br>
-  return m_register_info_count;<br>
-}<br>
<br>
Removed: lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h?rev=287915&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>h?rev=287915&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.h (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextFreeBSD_arm64.h (removed)<br>
@@ -1,69 +0,0 @@<br>
-//===-- RegisterContextFreeBSD_arm64.h --------------------------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===------------------------<wbr>------------------------------<wbr>----------------===//<br>
-<br>
-#ifndef liblldb_<wbr>RegisterContextFreeBSD_arm64_<wbr>H_<br>
-#define liblldb_<wbr>RegisterContextFreeBSD_arm64_<wbr>H_<br>
-<br>
-#include "RegisterInfoInterface.h"<br>
-<br>
-class RegisterContextFreeBSD_arm64<br>
-    : public lldb_private::<wbr>RegisterInfoInterface {<br>
-public:<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct GPR {<br>
-    uint64_t x[29]; // x0-x28<br>
-    uint64_t fp;    // x29<br>
-    uint64_t lr;    // x30<br>
-    uint64_t sp;    // x31<br>
-    uint64_t pc;    // pc<br>
-    uint32_t cpsr;  // cpsr<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct VReg {<br>
-    uint8_t bytes[16];<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct FPU {<br>
-    VReg v[32];<br>
-    uint32_t fpsr;<br>
-    uint32_t fpcr;<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct EXC {<br>
-    uint64_t far;       // Virtual Fault Address<br>
-    uint32_t esr;       // Exception syndrome<br>
-    uint32_t exception; // number of arm exception token<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct DBG {<br>
-    uint64_t bvr[16];<br>
-    uint64_t bcr[16];<br>
-    uint64_t wvr[16];<br>
-    uint64_t wcr[16];<br>
-    uint64_t mdscr_el1;<br>
-  };<br>
-<br>
-  RegisterContextFreeBSD_arm64(<wbr>const lldb_private::ArchSpec &target_arch);<br>
-<br>
-  size_t GetGPRSize() const override;<br>
-<br>
-  const lldb_private::RegisterInfo *GetRegisterInfo() const override;<br>
-<br>
-  uint32_t GetRegisterCount() const override;<br>
-<br>
-private:<br>
-  const lldb_private::RegisterInfo *m_register_info_p;<br>
-  uint32_t m_register_info_count;<br>
-};<br>
-<br>
-#endif<br>
<br>
Removed: lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp?rev=287915&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>RegisterContextLinux_arm64.<wbr>cpp?rev=287915&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.cpp (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.cpp (removed)<br>
@@ -1,99 +0,0 @@<br>
-//===-- RegisterContextLinux_arm64.cpp -------------------------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===------------------------<wbr>------------------------------<wbr>---------------===//<br>
-<br>
-#include <cassert><br>
-#include <stddef.h><br>
-#include <vector><br>
-<br>
-#include "lldb/lldb-defines.h"<br>
-#include "llvm/Support/Compiler.h"<br>
-<br>
-#include "RegisterContextLinux_arm64.h"<br>
-<br>
-// Based on RegisterContextDarwin_arm64.<wbr>cpp<br>
-#define GPR_OFFSET(idx) ((idx)*8)<br>
-#define GPR_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::GPR, reg))<br>
-<br>
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextLinux_<wbr>arm64::GPR))<br>
-#define FPU_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::FPU, reg) +             \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::GPR))<br>
-<br>
-#define EXC_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::EXC, reg) +             \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::GPR) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::FPU))<br>
-#define DBG_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::DBG, reg) +             \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::GPR) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::FPU) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::EXC))<br>
-<br>
-#define DEFINE_DBG(reg, i)                                                     \<br>
-  #reg, NULL,                                                                  \<br>
-      sizeof(((RegisterContextLinux_<wbr>arm64::DBG *) NULL)->reg[i]),              \<br>
-              DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex,  \<br>
-                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \<br>
-                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \<br>
-                               dbg_##reg##i },                                 \<br>
-                               NULL, NULL, NULL, 0<br>
-#define REG_CONTEXT_SIZE                                                       \<br>
-  (sizeof(RegisterContextLinux_<wbr>arm64::GPR) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::FPU) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::EXC))<br>
-<br>
-//---------------------------<wbr>------------------------------<wbr>--------------------<br>
-// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.<br>
-//---------------------------<wbr>------------------------------<wbr>--------------------<br>
-#define DECLARE_REGISTER_INFOS_ARM64_<wbr>STRUCT<br>
-#include "RegisterInfos_arm64.h"<br>
-#undef DECLARE_REGISTER_INFOS_ARM64_<wbr>STRUCT<br>
-<br>
-static const lldb_private::RegisterInfo *<br>
-GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {<br>
-  switch (target_arch.GetMachine()) {<br>
-  case llvm::Triple::aarch64:<br>
-    return g_register_infos_arm64_le;<br>
-  default:<br>
-    assert(false && "Unhandled target architecture.");<br>
-    return NULL;<br>
-  }<br>
-}<br>
-<br>
-static uint32_t<br>
-GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {<br>
-  switch (target_arch.GetMachine()) {<br>
-  case llvm::Triple::aarch64:<br>
-    return static_cast<uint32_t>(sizeof(<wbr>g_register_infos_arm64_le) /<br>
-                                 sizeof(g_register_infos_arm64_<wbr>le[0]));<br>
-  default:<br>
-    assert(false && "Unhandled target architecture.");<br>
-    return 0;<br>
-  }<br>
-}<br>
-<br>
-RegisterContextLinux_arm64::<wbr>RegisterContextLinux_arm64(<br>
-    const lldb_private::ArchSpec &target_arch)<br>
-    : lldb_private::<wbr>RegisterInfoInterface(target_<wbr>arch),<br>
-      m_register_info_p(<wbr>GetRegisterInfoPtr(target_<wbr>arch)),<br>
-      m_register_info_count(<wbr>GetRegisterInfoCount(target_<wbr>arch)) {}<br>
-<br>
-size_t RegisterContextLinux_arm64::<wbr>GetGPRSize() const {<br>
-  return sizeof(struct RegisterContextLinux_arm64::<wbr>GPR);<br>
-}<br>
-<br>
-const lldb_private::RegisterInfo *<br>
-RegisterContextLinux_arm64::<wbr>GetRegisterInfo() const {<br>
-  return m_register_info_p;<br>
-}<br>
-<br>
-uint32_t RegisterContextLinux_arm64::<wbr>GetRegisterCount() const {<br>
-  return m_register_info_count;<br>
-}<br>
<br>
Removed: lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h?rev=287915&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>RegisterContextLinux_arm64.h?<wbr>rev=287915&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h (removed)<br>
@@ -1,70 +0,0 @@<br>
-//===-- RegisterContextLinux_arm64.h ----------------------------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===------------------------<wbr>------------------------------<wbr>----------------===//<br>
-<br>
-#ifndef liblldb_RegisterContextLinux_<wbr>arm64_H_<br>
-#define liblldb_RegisterContextLinux_<wbr>arm64_H_<br>
-<br>
-#include "RegisterInfoInterface.h"<br>
-#include "lldb/Target/RegisterContext.<wbr>h"<br>
-#include "lldb/lldb-private.h"<br>
-<br>
-class RegisterContextLinux_arm64 : public lldb_private::<wbr>RegisterInfoInterface {<br>
-public:<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct GPR {<br>
-    uint64_t x[29]; // x0-x28<br>
-    uint64_t fp;    // x29<br>
-    uint64_t lr;    // x30<br>
-    uint64_t sp;    // x31<br>
-    uint64_t pc;    // pc<br>
-    uint32_t cpsr;  // cpsr<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct VReg {<br>
-    uint8_t bytes[16];<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct FPU {<br>
-    VReg v[32];<br>
-    uint32_t fpsr;<br>
-    uint32_t fpcr;<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct EXC {<br>
-    uint64_t far;       // Virtual Fault Address<br>
-    uint32_t esr;       // Exception syndrome<br>
-    uint32_t exception; // number of arm exception token<br>
-  };<br>
-<br>
-  // based on RegisterContextDarwin_arm64.h<br>
-  struct DBG {<br>
-    uint64_t bvr[16];<br>
-    uint64_t bcr[16];<br>
-    uint64_t wvr[16];<br>
-    uint64_t wcr[16];<br>
-    uint64_t mdscr_el1;<br>
-  };<br>
-<br>
-  RegisterContextLinux_arm64(<wbr>const lldb_private::ArchSpec &target_arch);<br>
-<br>
-  size_t GetGPRSize() const override;<br>
-<br>
-  const lldb_private::RegisterInfo *GetRegisterInfo() const override;<br>
-<br>
-  uint32_t GetRegisterCount() const override;<br>
-<br>
-private:<br>
-  const lldb_private::RegisterInfo *m_register_info_p;<br>
-  uint32_t m_register_info_count;<br>
-};<br>
-<br>
-#endif<br>
<br>
Copied: lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.cpp (from r287896, lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.<wbr>cpp)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp&p1=lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp&r1=287896&r2=287916&rev=287916&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>RegisterInfoPOSIX_arm64.cpp?<wbr>p2=lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.cpp&<wbr>p1=lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.<wbr>cpp&r1=287896&r2=287916&rev=<wbr>287916&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.cpp (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.cpp Fri Nov 25 04:28:09 2016<br>
@@ -1,4 +1,4 @@<br>
-//===-- RegisterContextLinux_arm64.cpp -------------------------*- C++ -*-===//<br>
+//===-- RegisterInfoPOSIX_arm64.cpp ----------------------------*- C++ -*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -14,40 +14,40 @@<br>
 #include "lldb/lldb-defines.h"<br>
 #include "llvm/Support/Compiler.h"<br>
<br>
-#include "RegisterContextLinux_arm64.h"<br>
+#include "RegisterInfoPOSIX_arm64.h"<br>
<br>
 // Based on RegisterContextDarwin_arm64.<wbr>cpp<br>
 #define GPR_OFFSET(idx) ((idx)*8)<br>
 #define GPR_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::GPR, reg))<br>
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_<wbr>arm64::GPR, reg))<br>
<br>
-#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterContextLinux_<wbr>arm64::GPR))<br>
+#define FPU_OFFSET(idx) ((idx)*16 + sizeof(RegisterInfoPOSIX_<wbr>arm64::GPR))<br>
 #define FPU_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::FPU, reg) +             \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::GPR))<br>
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_<wbr>arm64::FPU, reg) +                \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::GPR))<br>
<br>
 #define EXC_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::EXC, reg) +             \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::GPR) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::FPU))<br>
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_<wbr>arm64::EXC, reg) +                \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::GPR) +                                      \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::FPU))<br>
 #define DBG_OFFSET_NAME(reg)                                                   \<br>
-  (LLVM_EXTENSION offsetof(RegisterContextLinux_<wbr>arm64::DBG, reg) +             \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::GPR) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::FPU) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::EXC))<br>
+  (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_<wbr>arm64::DBG, reg) +                \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::GPR) +                                      \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::FPU) +                                      \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::EXC))<br>
<br>
 #define DEFINE_DBG(reg, i)                                                     \<br>
   #reg, NULL,                                                                  \<br>
-      sizeof(((RegisterContextLinux_<wbr>arm64::DBG *) NULL)->reg[i]),              \<br>
+      sizeof(((RegisterInfoPOSIX_<wbr>arm64::DBG *) NULL)->reg[i]),                 \<br>
               DBG_OFFSET_NAME(reg[i]), lldb::eEncodingUint, lldb::eFormatHex,  \<br>
                               {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \<br>
                                LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \<br>
                                dbg_##reg##i },                                 \<br>
                                NULL, NULL, NULL, 0<br>
 #define REG_CONTEXT_SIZE                                                       \<br>
-  (sizeof(RegisterContextLinux_<wbr>arm64::GPR) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::FPU) +                                   \<br>
-   sizeof(RegisterContextLinux_<wbr>arm64::EXC))<br>
+  (sizeof(RegisterInfoPOSIX_<wbr>arm64::GPR) +                                      \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::FPU) +                                      \<br>
+   sizeof(RegisterInfoPOSIX_<wbr>arm64::EXC))<br>
<br>
 //----------------------------<wbr>------------------------------<wbr>-------------------<br>
 // Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.<br>
@@ -79,21 +79,21 @@ GetRegisterInfoCount(const lldb_private:<br>
   }<br>
 }<br>
<br>
-RegisterContextLinux_arm64::<wbr>RegisterContextLinux_arm64(<br>
+RegisterInfoPOSIX_arm64::<wbr>RegisterInfoPOSIX_arm64(<br>
     const lldb_private::ArchSpec &target_arch)<br>
     : lldb_private::<wbr>RegisterInfoInterface(target_<wbr>arch),<br>
       m_register_info_p(<wbr>GetRegisterInfoPtr(target_<wbr>arch)),<br>
       m_register_info_count(<wbr>GetRegisterInfoCount(target_<wbr>arch)) {}<br>
<br>
-size_t RegisterContextLinux_arm64::<wbr>GetGPRSize() const {<br>
-  return sizeof(struct RegisterContextLinux_arm64::<wbr>GPR);<br>
+size_t RegisterInfoPOSIX_arm64::<wbr>GetGPRSize() const {<br>
+  return sizeof(struct RegisterInfoPOSIX_arm64::GPR);<br>
 }<br>
<br>
 const lldb_private::RegisterInfo *<br>
-RegisterContextLinux_arm64::<wbr>GetRegisterInfo() const {<br>
+RegisterInfoPOSIX_arm64::<wbr>GetRegisterInfo() const {<br>
   return m_register_info_p;<br>
 }<br>
<br>
-uint32_t RegisterContextLinux_arm64::<wbr>GetRegisterCount() const {<br>
+uint32_t RegisterInfoPOSIX_arm64::<wbr>GetRegisterCount() const {<br>
   return m_register_info_count;<br>
 }<br>
<br>
Copied: lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h (from r287896, lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h?p2=lldb/trunk/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h&p1=lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h&r1=287896&r2=287916&rev=287916&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h?p2=<wbr>lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h&p1=<wbr>lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h&<wbr>r1=287896&r2=287916&rev=<wbr>287916&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterContextLinux_arm64.h (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h Fri Nov 25 04:28:09 2016<br>
@@ -1,4 +1,4 @@<br>
-//===-- RegisterContextLinux_arm64.h ----------------------------*- C++ -*-===//<br>
+//===-- RegisterInfoPOSIX_arm64.h ------------------------------<wbr>-*- C++ -*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -14,7 +14,7 @@<br>
 #include "lldb/Target/RegisterContext.<wbr>h"<br>
 #include "lldb/lldb-private.h"<br>
<br>
-class RegisterContextLinux_arm64 : public lldb_private::<wbr>RegisterInfoInterface {<br>
+class RegisterInfoPOSIX_arm64 : public lldb_private::<wbr>RegisterInfoInterface {<br>
 public:<br>
   // based on RegisterContextDarwin_arm64.h<br>
   struct GPR {<br>
@@ -54,7 +54,7 @@ public:<br>
     uint64_t mdscr_el1;<br>
   };<br>
<br>
-  RegisterContextLinux_arm64(<wbr>const lldb_private::ArchSpec &target_arch);<br>
+  RegisterInfoPOSIX_arm64(const lldb_private::ArchSpec &target_arch);<br>
<br>
   size_t GetGPRSize() const override;<br>
<br>
<br>
Modified: lldb/trunk/source/Plugins/<wbr>Process/elf-core/<wbr>ThreadElfCore.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp?rev=287916&r1=287915&r2=287916&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lldb/trunk/source/<wbr>Plugins/Process/elf-core/<wbr>ThreadElfCore.cpp?rev=287916&<wbr>r1=287915&r2=287916&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lldb/trunk/source/Plugins/<wbr>Process/elf-core/<wbr>ThreadElfCore.cpp (original)<br>
+++ lldb/trunk/source/Plugins/<wbr>Process/elf-core/<wbr>ThreadElfCore.cpp Fri Nov 25 04:28:09 2016<br>
@@ -15,16 +15,15 @@<br>
 #include "lldb/Target/Unwind.h"<br>
<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_arm.h"<br>
-#include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_arm64.<wbr>h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_i386.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_mips64.<wbr>h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_<wbr>powerpc.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextFreeBSD_x86_64.<wbr>h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextLinux_arm.h"<br>
-#include "Plugins/Process/Utility/<wbr>RegisterContextLinux_arm64.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextLinux_i386.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextLinux_s390x.h"<br>
 #include "Plugins/Process/Utility/<wbr>RegisterContextLinux_x86_64.h"<br>
+#include "Plugins/Process/Utility/<wbr>RegisterInfoPOSIX_arm64.h"<br>
 #include "ProcessElfCore.h"<br>
 #include "RegisterContextPOSIXCore_arm.<wbr>h"<br>
 #include "RegisterContextPOSIXCore_<wbr>arm64.h"<br>
@@ -86,7 +85,7 @@ ThreadElfCore::<wbr>CreateRegisterContextForF<br>
     case llvm::Triple::FreeBSD: {<br>
       switch (arch.GetMachine()) {<br>
       case llvm::Triple::aarch64:<br>
-        reg_interface = new RegisterContextFreeBSD_arm64(<wbr>arch);<br>
+        reg_interface = new RegisterInfoPOSIX_arm64(arch);<br>
         break;<br>
       case llvm::Triple::arm:<br>
         reg_interface = new RegisterContextFreeBSD_arm(<wbr>arch);<br>
@@ -118,7 +117,7 @@ ThreadElfCore::<wbr>CreateRegisterContextForF<br>
         reg_interface = new RegisterContextLinux_arm(arch)<wbr>;<br>
         break;<br>
       case llvm::Triple::aarch64:<br>
-        reg_interface = new RegisterContextLinux_arm64(<wbr>arch);<br>
+        reg_interface = new RegisterInfoPOSIX_arm64(arch);<br>
         break;<br>
       case llvm::Triple::systemz:<br>
         reg_interface = new RegisterContextLinux_s390x(<wbr>arch);<br>
<br>
<br>
______________________________<wbr>_________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Tim <<a href="mailto:penryu@gmail.com" target="_blank">penryu@gmail.com</a>></div>
</div>