[Lldb-commits] [lldb] r233176 - Fix wrong type convesrion in ReadRegOperation
Tamas Berghammer
tberghammer at google.com
Wed Mar 25 03:14:19 PDT 2015
Author: tberghammer
Date: Wed Mar 25 05:14:19 2015
New Revision: 233176
URL: http://llvm.org/viewvc/llvm-project?rev=233176&view=rev
Log:
Fix wrong type convesrion in ReadRegOperation
The automatic conversion from long int to lldb::addr_t caused sign
extension but for a register read it is an unwanted behaviour. Fix with
forcing different conversion path.
Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=233176&r1=233175&r2=233176&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Mar 25 05:14:19 2015
@@ -659,7 +659,7 @@ namespace
#else
Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_REGISTERS));
- lldb::addr_t data = PTRACE(PTRACE_PEEKUSER, m_tid, (void*)m_offset, nullptr, 0, m_error);
+ lldb::addr_t data = static_cast<unsigned long>(PTRACE(PTRACE_PEEKUSER, m_tid, (void*)m_offset, nullptr, 0, m_error));
if (m_error.Success())
m_value = data;
More information about the lldb-commits
mailing list