[Lldb-commits] [lldb] r279238 - Fix 32-bit builds after r279232

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 19 06:14:13 PDT 2016


Author: labath
Date: Fri Aug 19 08:14:13 2016
New Revision: 279238

URL: http://llvm.org/viewvc/llvm-project?rev=279238&view=rev
Log:
Fix 32-bit builds after r279232

GetByteSize() of a DataBuffer returns a uint64_t (it probably shouldn't), which isn't implicitly
convertible to size_t.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=279238&r1=279237&r2=279238&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Fri Aug 19 08:14:13 2016
@@ -383,7 +383,7 @@ GDBRemoteRegisterContext::WriteRegisterB
 
                     // Set all registers in one packet
                     if (gdb_comm.WriteAllRegisters(m_thread.GetProtocolID(),
-                                                   {m_reg_data.GetDataStart(), m_reg_data.GetByteSize()}))
+                                                   {m_reg_data.GetDataStart(), size_t(m_reg_data.GetByteSize())}))
 
                     {
                         SetAllRegisterValid (false);
@@ -586,7 +586,8 @@ GDBRemoteRegisterContext::WriteAllRegist
         // The data_sp contains the G response packet.
         if (use_g_packet)
         {
-            if (gdb_comm.WriteAllRegisters(m_thread.GetProtocolID(), {data_sp->GetBytes(), data_sp->GetByteSize()}))
+            if (gdb_comm.WriteAllRegisters(m_thread.GetProtocolID(),
+                                           {data_sp->GetBytes(), size_t(data_sp->GetByteSize())}))
                 return true;
 
             uint32_t num_restored = 0;




More information about the lldb-commits mailing list