clayborg requested changes to this revision. This revision now requires changes to proceed.
================ Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:1378 @@ -1377,2 +1377,3 @@ GPR_linux_mips regs; + lldb_private::ArchSpec arch; ::memset(®s, 0, sizeof(GPR_linux_mips)); ---------------- tberghammer wrote: > You use this variable without initializing it. You can call SetBytes with an > explicit byte order value (e.g. eByteOrderLittle) as it isn't matter during 0 > initialization. Remove this. ================ Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:1382 @@ -1379,1 +1381,3 @@ + // Clear all bits in RegisterValue before writing actual value read from ptrace to avoid garbage value in 32-bit MSB + value.SetBytes((void *)(((unsigned char *)®s) + offset), 8, arch.GetByteOrder()); Error error = NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(), NULL, ®s, sizeof regs); ---------------- Just call the member function GetByteOrder() that is built into NativeRegisterContextLinux: ``` value.SetBytes((void *)(((unsigned char *)®s) + offset), 8, GetByteOrder()); ``` Repository: rL LLVM http://reviews.llvm.org/D14633 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits