[Lldb-commits] [lldb] r353269 - Add a warning to GDBRemoteRegisterContext (if packet logging enabled)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 5 20:08:09 PST 2019
Author: jmolenda
Date: Tue Feb 5 20:08:09 2019
New Revision: 353269
URL: http://llvm.org/viewvc/llvm-project?rev=353269&view=rev
Log:
Add a warning to GDBRemoteRegisterContext (if packet logging enabled)
if the size of the g packet response was smaller than expected and is
going to be ignored.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=353269&r1=353268&r2=353269&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Tue Feb 5 20:08:09 2019
@@ -205,6 +205,14 @@ bool GDBRemoteRegisterContext::ReadRegis
if (buffer_sp->GetByteSize() >= m_reg_data.GetByteSize()) {
SetAllRegisterValid(true);
return true;
+ } else {
+ Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_THREAD |
+ GDBR_LOG_PACKETS));
+ if (log)
+ log->Printf ("error: GDBRemoteRegisterContext::ReadRegisterBytes tried to read the "
+ "entire register context at once, expected at least %" PRId64 " bytes "
+ "but only got %" PRId64 " bytes.", m_reg_data.GetByteSize(),
+ buffer_sp->GetByteSize());
}
}
return false;
More information about the lldb-commits
mailing list