Add debug asserts / sanity checks to
authorJason Molenda <jmolenda@apple.com>
Thu, 24 Jul 2014 01:53:11 +0000 (01:53 +0000)
committerJason Molenda <jmolenda@apple.com>
Thu, 24 Jul 2014 01:53:11 +0000 (01:53 +0000)
commit9e7da0fb44b6d999700ba96743b16c1c112c2baa
tree67ce262b942eb45e4bae0ae60cb89d4f716d5ba7
parent36a216eefc8c1d46bc6704cd355d55abbea33c41
Add debug asserts / sanity checks to
GDBRemoteRegisterContext::ReadRegisterBytes and
GDBRemoteRegisterContext::WriteRegisterBytes to ensure we don't try
to read/write off the end of the register buffer.  This should never
happen but we've had some target confusion in the past where it
did; adding the checks is prudent to avoid crashing here if it happens
again.

<rdar://problem/16450971>
<rdar://problem/16458182>

llvm-svn: 213829
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp