This revision was automatically updated to reflect the committed changes. Closed by commit rL357055: Fix an out-of-bounds error in RegisterContextDarwin_arm64 (authored by labath, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D59495?vs=191101&id=192419#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59495/new/ https://reviews.llvm.org/D59495 Files: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -429,7 +429,7 @@ case fpu_v29: case fpu_v30: case fpu_v31: - value.SetBytes(fpu.v[reg].bytes.buffer, reg_info->byte_size, + value.SetBytes(fpu.v[reg - fpu_v0].bytes.buffer, reg_info->byte_size, endian::InlHostByteOrder()); break; @@ -621,7 +621,8 @@ case fpu_v29: case fpu_v30: case fpu_v31: - ::memcpy(fpu.v[reg].bytes.buffer, value.GetBytes(), value.GetByteSize()); + ::memcpy(fpu.v[reg - fpu_v0].bytes.buffer, value.GetBytes(), + value.GetByteSize()); break; case fpu_fpsr:
Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -429,7 +429,7 @@ case fpu_v29: case fpu_v30: case fpu_v31: - value.SetBytes(fpu.v[reg].bytes.buffer, reg_info->byte_size, + value.SetBytes(fpu.v[reg - fpu_v0].bytes.buffer, reg_info->byte_size, endian::InlHostByteOrder()); break; @@ -621,7 +621,8 @@ case fpu_v29: case fpu_v30: case fpu_v31: - ::memcpy(fpu.v[reg].bytes.buffer, value.GetBytes(), value.GetByteSize()); + ::memcpy(fpu.v[reg - fpu_v0].bytes.buffer, value.GetBytes(), + value.GetByteSize()); break; case fpu_fpsr:
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits