[llvm-branch-commits] [lldb] r287345 - Merging r283728:
Nitesh Jain via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Nov 18 06:14:37 PST 2016
Author: nitesh.jain
Date: Fri Nov 18 08:14:37 2016
New Revision: 287345
URL: http://llvm.org/viewvc/llvm-project?rev=287345&view=rev
Log:
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
------------------------------------------------------------------------
Modified:
lldb/branches/release_39/ (props changed)
lldb/branches/release_39/source/Core/RegisterValue.cpp
lldb/branches/release_39/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
Propchange: lldb/branches/release_39/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 18 08:14:37 2016
@@ -1,3 +1,3 @@
/lldb/branches/apple/python-GIL:156467-162159
/lldb/branches/iohandler:198360-200250
-/lldb/trunk:277343,277426,277997,277999,278001
+/lldb/trunk:277343,277426,277997,277999,278001,283728
Modified: lldb/branches/release_39/source/Core/RegisterValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_39/source/Core/RegisterValue.cpp?rev=287345&r1=287344&r2=287345&view=diff
==============================================================================
--- lldb/branches/release_39/source/Core/RegisterValue.cpp (original)
+++ lldb/branches/release_39/source/Core/RegisterValue.cpp Fri Nov 18 08:14:37 2016
@@ -652,34 +652,37 @@ RegisterValue::GetAsUInt32 (uint32_t fai
uint64_t
RegisterValue::GetAsUInt64 (uint64_t fail_value, bool *success_ptr) const
{
- if (success_ptr)
- *success_ptr = true;
- switch (m_type)
- {
- default: break;
- case eTypeUInt8:
- case eTypeUInt16:
- case eTypeUInt32:
- case eTypeUInt64:
- case eTypeFloat:
- case eTypeDouble:
- case eTypeLongDouble: return m_scalar.ULongLong(fail_value);
- case eTypeBytes:
- {
- switch (buffer.length)
- {
- default: break;
- case 1:
- case 2:
- case 4:
- case 8: return *(const uint64_t *)buffer.bytes;
- }
- }
- break;
+ if (success_ptr)
+ *success_ptr = true;
+ switch (m_type) {
+ default:
+ break;
+ case eTypeUInt8:
+ case eTypeUInt16:
+ case eTypeUInt32:
+ case eTypeUInt64:
+ case eTypeFloat:
+ case eTypeDouble:
+ case eTypeLongDouble:
+ return m_scalar.ULongLong(fail_value);
+ case eTypeBytes: {
+ switch (buffer.length) {
+ default:
+ break;
+ case 1:
+ return *(const uint8_t *)buffer.bytes;
+ case 2:
+ return *(const uint16_t *)buffer.bytes;
+ case 4:
+ return *(const uint32_t *)buffer.bytes;
+ case 8:
+ return *(const uint64_t *)buffer.bytes;
}
- if (success_ptr)
- *success_ptr = false;
- return fail_value;
+ } break;
+ }
+ if (success_ptr)
+ *success_ptr = false;
+ return fail_value;
}
llvm::APInt
Modified: lldb/branches/release_39/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_39/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp?rev=287345&r1=287344&r2=287345&view=diff
==============================================================================
--- lldb/branches/release_39/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp (original)
+++ lldb/branches/release_39/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp Fri Nov 18 08:14:37 2016
@@ -180,8 +180,8 @@ NativeRegisterContextLinux::DoReadRegist
PTRACE_PEEKUSER, m_thread.GetID(), reinterpret_cast<void *>(offset), nullptr, 0, &data);
if (error.Success())
- // First cast to an unsigned of the same size to avoid sign extension.
- value.SetUInt64(static_cast<unsigned long>(data));
+ // First cast to an unsigned of the same size to avoid sign extension.
+ value.SetUInt(static_cast<unsigned long>(data), size);
if (log)
log->Printf ("NativeRegisterContextLinux::%s() reg %s: 0x%lx", __FUNCTION__, reg_name, data);
More information about the llvm-branch-commits
mailing list