~pali/llvm/lldb-3.9

« back to all changes in this revision

Viewing changes to source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp

  • Committer: nitesh.jain
  • Date: 2016-11-18 14:14:37 UTC
  • Revision ID: svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:lldb/branches/release_39:287345
Merging r283728:
------------------------------------------------------------------------
r283728 | nitesh.jain | 2016-10-10 14:32:41 +0530 (Mon, 10 Oct 2016) | 7 lines

[LLDB][MIPS] Fix register read/write for 32 bit big endian system

Reviewers: clayborg, labath

Subscribers: jaydeep, bhushan, mohit.bhakkad, slthakur, llvm-commits

Differential Revision: https://reviews.llvm.org/D24124
------------------------------------------------------------------------

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
            PTRACE_PEEKUSER, m_thread.GetID(), reinterpret_cast<void *>(offset), nullptr, 0, &data);
181
181
 
182
182
    if (error.Success())
183
 
        // First cast to an unsigned of the same size to avoid sign extension.
184
 
        value.SetUInt64(static_cast<unsigned long>(data));
 
183
      // First cast to an unsigned of the same size to avoid sign extension.
 
184
      value.SetUInt(static_cast<unsigned long>(data), size);
185
185
 
186
186
    if (log)
187
187
        log->Printf ("NativeRegisterContextLinux::%s() reg %s: 0x%lx", __FUNCTION__, reg_name, data);