[Lldb-commits] [lldb] r320969 - Fix FreeBSD build broken by r320966

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 18 03:05:28 PST 2017


Author: labath
Date: Mon Dec 18 03:05:28 2017
New Revision: 320969

URL: http://llvm.org/viewvc/llvm-project?rev=320969&view=rev
Log:
Fix FreeBSD build broken by r320966

Modified:
    lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp?rev=320969&r1=320968&r2=320969&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp Mon Dec 18 03:05:28 2017
@@ -59,8 +59,8 @@ RegisterContextPOSIXProcessMonitor_x86_6
   const RegisterInfo *reg_info_fctrl = GetRegisterInfoByName("fctrl");
   m_fctrl_offset_in_userarea = reg_info_fctrl->byte_offset;
 
-  m_iovec.iov_base = &m_fpr.xstate.xsave;
-  m_iovec.iov_len = sizeof(m_fpr.xstate.xsave);
+  m_iovec.iov_base = &m_fpr.xsave;
+  m_iovec.iov_len = sizeof(m_fpr.xsave);
 }
 
 ProcessMonitor &RegisterContextPOSIXProcessMonitor_x86_64::GetMonitor() {
@@ -77,12 +77,12 @@ bool RegisterContextPOSIXProcessMonitor_
 bool RegisterContextPOSIXProcessMonitor_x86_64::ReadFPR() {
   ProcessMonitor &monitor = GetMonitor();
   if (GetFPRType() == eFXSAVE)
-    return monitor.ReadFPR(m_thread.GetID(), &m_fpr.xstate.fxsave,
-                           sizeof(m_fpr.xstate.fxsave));
+    return monitor.ReadFPR(m_thread.GetID(), &m_fpr.fxsave,
+                           sizeof(m_fpr.fxsave));
 
   if (GetFPRType() == eXSAVE)
     return monitor.ReadRegisterSet(m_thread.GetID(), &m_iovec,
-                                   sizeof(m_fpr.xstate.xsave), NT_X86_XSTATE);
+                                   sizeof(m_fpr.xsave), NT_X86_XSTATE);
   return false;
 }
 
@@ -94,12 +94,12 @@ bool RegisterContextPOSIXProcessMonitor_
 bool RegisterContextPOSIXProcessMonitor_x86_64::WriteFPR() {
   ProcessMonitor &monitor = GetMonitor();
   if (GetFPRType() == eFXSAVE)
-    return monitor.WriteFPR(m_thread.GetID(), &m_fpr.xstate.fxsave,
-                            sizeof(m_fpr.xstate.fxsave));
+    return monitor.WriteFPR(m_thread.GetID(), &m_fpr.fxsave,
+                            sizeof(m_fpr.fxsave));
 
   if (GetFPRType() == eXSAVE)
     return monitor.WriteRegisterSet(m_thread.GetID(), &m_iovec,
-                                    sizeof(m_fpr.xstate.xsave), NT_X86_XSTATE);
+                                    sizeof(m_fpr.xsave), NT_X86_XSTATE);
   return false;
 }
 
@@ -212,17 +212,14 @@ bool RegisterContextPOSIXProcessMonitor_
 
     if (byte_order != ByteOrder::eByteOrderInvalid) {
       if (reg >= m_reg_info.first_st && reg <= m_reg_info.last_st)
-        value.SetBytes(
-            m_fpr.xstate.fxsave.stmm[reg - m_reg_info.first_st].bytes,
-            reg_info->byte_size, byte_order);
+        value.SetBytes(m_fpr.fxsave.stmm[reg - m_reg_info.first_st].bytes,
+                       reg_info->byte_size, byte_order);
       if (reg >= m_reg_info.first_mm && reg <= m_reg_info.last_mm)
-        value.SetBytes(
-            m_fpr.xstate.fxsave.stmm[reg - m_reg_info.first_mm].bytes,
-            reg_info->byte_size, byte_order);
+        value.SetBytes(m_fpr.fxsave.stmm[reg - m_reg_info.first_mm].bytes,
+                       reg_info->byte_size, byte_order);
       if (reg >= m_reg_info.first_xmm && reg <= m_reg_info.last_xmm)
-        value.SetBytes(
-            m_fpr.xstate.fxsave.xmm[reg - m_reg_info.first_xmm].bytes,
-            reg_info->byte_size, byte_order);
+        value.SetBytes(m_fpr.fxsave.xmm[reg - m_reg_info.first_xmm].bytes,
+                       reg_info->byte_size, byte_order);
       if (reg >= m_reg_info.first_ymm && reg <= m_reg_info.last_ymm) {
         // Concatenate ymm using the register halves in xmm.bytes and ymmh.bytes
         if (GetFPRType() == eXSAVE && CopyXSTATEtoYMM(reg, byte_order))
@@ -236,7 +233,7 @@ bool RegisterContextPOSIXProcessMonitor_
     return false;
   }
 
-  // Get pointer to m_fpr.xstate.fxsave variable and set the data from it.
+  // Get pointer to m_fpr.fxsave variable and set the data from it.
   // Byte offsets of all registers are calculated wrt 'UserArea' structure.
   // However, ReadFPR() reads fpu registers {using ptrace(PT_GETFPREGS,..)}
   // and stores them in 'm_fpr' (of type FPR structure). To extract values of
@@ -279,15 +276,15 @@ bool RegisterContextPOSIXProcessMonitor_
   if (IsFPR(reg, GetFPRType())) {
     if (reg_info->encoding == eEncodingVector) {
       if (reg >= m_reg_info.first_st && reg <= m_reg_info.last_st)
-        ::memcpy(m_fpr.xstate.fxsave.stmm[reg - m_reg_info.first_st].bytes,
+        ::memcpy(m_fpr.fxsave.stmm[reg - m_reg_info.first_st].bytes,
                  value.GetBytes(), value.GetByteSize());
 
       if (reg >= m_reg_info.first_mm && reg <= m_reg_info.last_mm)
-        ::memcpy(m_fpr.xstate.fxsave.stmm[reg - m_reg_info.first_mm].bytes,
+        ::memcpy(m_fpr.fxsave.stmm[reg - m_reg_info.first_mm].bytes,
                  value.GetBytes(), value.GetByteSize());
 
       if (reg >= m_reg_info.first_xmm && reg <= m_reg_info.last_xmm)
-        ::memcpy(m_fpr.xstate.fxsave.xmm[reg - m_reg_info.first_xmm].bytes,
+        ::memcpy(m_fpr.fxsave.xmm[reg - m_reg_info.first_xmm].bytes,
                  value.GetBytes(), value.GetByteSize());
 
       if (reg >= m_reg_info.first_ymm && reg <= m_reg_info.last_ymm) {
@@ -302,7 +299,7 @@ bool RegisterContextPOSIXProcessMonitor_
           return false;
       }
     } else {
-      // Get pointer to m_fpr.xstate.fxsave variable and set the data to it.
+      // Get pointer to m_fpr.fxsave variable and set the data to it.
       // Byte offsets of all registers are calculated wrt 'UserArea' structure.
       // However, WriteFPR() takes m_fpr (of type FPR structure) and writes only
       // fpu
@@ -356,7 +353,7 @@ bool RegisterContextPOSIXProcessMonitor_
       ::memcpy(dst, &m_gpr_x86_64, GetGPRSize());
       dst += GetGPRSize();
       if (GetFPRType() == eFXSAVE)
-        ::memcpy(dst, &m_fpr.xstate.fxsave, sizeof(m_fpr.xstate.fxsave));
+        ::memcpy(dst, &m_fpr.fxsave, sizeof(m_fpr.fxsave));
     }
 
     if (GetFPRType() == eXSAVE) {
@@ -388,9 +385,9 @@ bool RegisterContextPOSIXProcessMonitor_
       if (WriteGPR()) {
         src += GetGPRSize();
         if (GetFPRType() == eFXSAVE)
-          ::memcpy(&m_fpr.xstate.fxsave, src, sizeof(m_fpr.xstate.fxsave));
+          ::memcpy(&m_fpr.fxsave, src, sizeof(m_fpr.fxsave));
         if (GetFPRType() == eXSAVE)
-          ::memcpy(&m_fpr.xstate.xsave, src, sizeof(m_fpr.xstate.xsave));
+          ::memcpy(&m_fpr.xsave, src, sizeof(m_fpr.xsave));
 
         success = WriteFPR();
         if (success) {




More information about the lldb-commits mailing list